Enum shadow_rs::host::descriptor::socket::inet::InetSocket
source · pub enum InetSocket {
LegacyTcp(Arc<AtomicRefCell<LegacyTcpSocket>>),
Tcp(Arc<AtomicRefCell<TcpSocket>>),
Udp(Arc<AtomicRefCell<UdpSocket>>),
}
Variants§
LegacyTcp(Arc<AtomicRefCell<LegacyTcpSocket>>)
Tcp(Arc<AtomicRefCell<TcpSocket>>)
Udp(Arc<AtomicRefCell<UdpSocket>>)
Implementations§
source§impl InetSocket
impl InetSocket
pub fn borrow(&self) -> InetSocketRef<'_>
pub fn try_borrow(&self) -> Result<InetSocketRef<'_>, BorrowError>
pub fn borrow_mut(&self) -> InetSocketRefMut<'_>
pub fn try_borrow_mut(&self) -> Result<InetSocketRefMut<'_>, BorrowMutError>
pub fn downgrade(&self) -> InetSocketWeak
sourcepub fn canonical_handle(&self) -> usize
pub fn canonical_handle(&self) -> usize
Useful for getting a unique integer handle for a socket, or when we need to compare a C
LegacySocket
to a rust InetSocket
(which may internally point to the same
LegacySocket
).
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§
source§impl Clone for InetSocket
impl Clone for InetSocket
source§fn clone(&self) -> InetSocket
fn clone(&self) -> InetSocket
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InetSocket
impl Debug for InetSocket
source§impl Hash for InetSocket
impl Hash for InetSocket
source§impl PartialEq for InetSocket
impl PartialEq for InetSocket
impl Eq for InetSocket
Auto Trait Implementations§
impl Freeze for InetSocket
impl !RefUnwindSafe for InetSocket
impl Send for InetSocket
impl Sync for InetSocket
impl Unpin for InetSocket
impl !UnwindSafe for InetSocket
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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