#[repr(u32)]pub enum SocketType {
Stream = 1,
Datagram = 2,
Raw = 3,
}Expand description
Socket type.
Specifies the communication semantics for the socket.
Variants§
Stream = 1
Stream socket (TCP).
Provides sequenced, reliable, two-way, connection-based byte streams.
Datagram = 2
Datagram socket (UDP).
Provides connectionless, unreliable messages of a fixed maximum length.
Raw = 3
Raw socket.
Provides raw network protocol access.
Trait Implementations§
Source§impl Clone for SocketType
impl Clone for SocketType
Source§fn clone(&self) -> SocketType
fn clone(&self) -> SocketType
Returns a duplicate 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 SocketType
impl Debug for SocketType
Source§impl From<SocketType> for u32
impl From<SocketType> for u32
Source§fn from(enum_value: SocketType) -> Self
fn from(enum_value: SocketType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SocketType
impl PartialEq for SocketType
Source§impl TryFrom<u32> for SocketType
impl TryFrom<u32> for SocketType
Source§type Error = TryFromPrimitiveError<SocketType>
type Error = TryFromPrimitiveError<SocketType>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for SocketType
impl TryFromPrimitive for SocketType
const NAME: &'static str = "SocketType"
type Primitive = u32
type Error = TryFromPrimitiveError<SocketType>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for SocketType
impl Eq for SocketType
impl StructuralPartialEq for SocketType
Auto Trait Implementations§
impl Freeze for SocketType
impl RefUnwindSafe for SocketType
impl Send for SocketType
impl Sync for SocketType
impl Unpin for SocketType
impl UnwindSafe for SocketType
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