pub enum Socket {
Unix(Arc<AtomicRefCell<UnixSocket>>),
Inet(InetSocket),
Netlink(Arc<AtomicRefCell<NetlinkSocket>>),
}
Variants§
Implementations§
source§impl Socket
impl Socket
pub fn borrow(&self) -> SocketRef<'_>
pub fn try_borrow(&self) -> Result<SocketRef<'_>, BorrowError>
pub fn borrow_mut(&self) -> SocketRefMut<'_>
pub fn try_borrow_mut(&self) -> Result<SocketRefMut<'_>, BorrowMutError>
pub fn canonical_handle(&self) -> usize
pub fn bind( &self, addr: Option<&SockaddrStorage>, net_ns: &NetworkNamespace, rng: impl Rng, ) -> Result<(), SyscallError>
pub fn listen( &self, backlog: i32, net_ns: &NetworkNamespace, rng: impl Rng, cb_queue: &mut CallbackQueue, ) -> Result<(), Errno>
pub fn connect( &self, addr: &SockaddrStorage, net_ns: &NetworkNamespace, rng: impl Rng, cb_queue: &mut CallbackQueue, ) -> Result<(), SyscallError>
pub fn sendmsg( &self, args: SendmsgArgs<'_>, memory_manager: &mut MemoryManager, net_ns: &NetworkNamespace, rng: impl Rng, cb_queue: &mut CallbackQueue, ) -> Result<ssize_t, SyscallError>
pub fn recvmsg( &self, args: RecvmsgArgs<'_>, memory_manager: &mut MemoryManager, cb_queue: &mut CallbackQueue, ) -> Result<RecvmsgReturn, SyscallError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Socket
impl !RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin for Socket
impl !UnwindSafe for Socket
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more