pub enum Socket<'a> {
UnixSocket {
path: Cow<'a, Path>,
},
TcpSocket {
host: Cow<'a, str>,
port: u16,
},
}
Expand description
TCP/Unix socket
Variants§
Implementations§
Trait Implementations§
source§impl From<SocketAddr> for Socket<'static>
impl From<SocketAddr> for Socket<'static>
source§fn from(addr: SocketAddr) -> Self
fn from(addr: SocketAddr) -> Self
Converts to this type from the input type.
impl<'a> Eq for Socket<'a>
impl<'a> StructuralPartialEq for Socket<'a>
Auto Trait Implementations§
impl<'a> Freeze for Socket<'a>
impl<'a> RefUnwindSafe for Socket<'a>
impl<'a> Send for Socket<'a>
impl<'a> Sync for Socket<'a>
impl<'a> Unpin for Socket<'a>
impl<'a> UnwindSafe for Socket<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)