#[repr(i32)]
#[non_exhaustive]
pub enum SockType {
Stream,
Datagram,
SeqPacket,
Raw,
Rdm,
}
socket
only.Expand description
These constants are used to specify the communication semantics
when creating a socket with socket()
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Stream
Provides sequenced, reliable, two-way, connection- based byte streams. An out-of-band data transmission mechanism may be supported.
Datagram
Supports datagrams (connectionless, unreliable messages of a fixed maximum length).
SeqPacket
Provides a sequenced, reliable, two-way connection- based data transmission path for datagrams of fixed maximum length; a consumer is required to read an entire packet with each input system call.
Raw
Provides raw network protocol access.
Rdm
Provides a reliable datagram layer that does not guarantee ordering.
Trait Implementations
impl Copy for SockType
impl Eq for SockType
impl StructuralEq for SockType
impl StructuralPartialEq for SockType
Auto Trait Implementations
impl RefUnwindSafe for SockType
impl Send for SockType
impl Sync for SockType
impl Unpin for SockType
impl UnwindSafe for SockType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more