Struct TcpListener
pub struct TcpListener { pub(in ::sys::net::connection::socket) inner: Socket }
Fields
inner: Socket
Implementations
impl TcpListener
fn bind<A: ToSocketAddrs>(addr: A) -> Result<TcpListener>fn socket(&self) -> &Socketfn into_socket(self) -> Socketfn socket_addr(&self) -> Result<SocketAddr>fn accept(&self) -> Result<(TcpStream, SocketAddr)>fn duplicate(&self) -> Result<TcpListener>fn set_ttl(&self, ttl: u32) -> Result<()>fn ttl(&self) -> Result<u32>fn set_only_v6(&self, only_v6: bool) -> Result<()>fn only_v6(&self) -> Result<bool>fn take_error(&self) -> Result<Option<Error>>fn set_nonblocking(&self, nonblocking: bool) -> Result<()>
Trait Implementations
impl Debug for TcpListener
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl FromInner<Socket> for TcpListener
fn from_inner(socket: Socket) -> TcpListener
Auto Trait Implementations
impl Freeze for TcpListener
impl RefUnwindSafe for TcpListener
impl Send for TcpListener
impl Sync for TcpListener
impl Unpin for TcpListener
impl UnsafeUnpin for TcpListener
impl UnwindSafe for TcpListener
Blanket Implementations
impl<T> Any for TcpListener
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TcpListener
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TcpListener
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for TcpListener
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for TcpListener
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for TcpListener
impl<T, U> Into<U> for TcpListener
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for TcpListener
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for TcpListener
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>