#[repr(u32)]pub enum SocketProtocol {
IP = 0,
Tcp = 6,
Udp = 17,
Ipv6 = 41,
Raw = 255,
All = 512,
Tls1v2 = 258,
DTls1v2 = 273,
}Expand description
Socket protocol.
Specifies the protocol to use with the socket.
Variants§
IP = 0
Internet Protocol.
Tcp = 6
Transmission Control Protocol.
Udp = 17
User Datagram Protocol.
Ipv6 = 41
Internet Protocol Version 6.
Raw = 255
Raw IP packets.
All = 512
All protocols.
Tls1v2 = 258
Transport Layer Security 1.2.
DTls1v2 = 273
Datagram Transport Layer Security 1.2.
Trait Implementations§
Source§impl Clone for SocketProtocol
impl Clone for SocketProtocol
Source§fn clone(&self) -> SocketProtocol
fn clone(&self) -> SocketProtocol
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 SocketProtocol
impl Debug for SocketProtocol
Source§impl From<SocketProtocol> for u32
impl From<SocketProtocol> for u32
Source§fn from(enum_value: SocketProtocol) -> Self
fn from(enum_value: SocketProtocol) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SocketProtocol
impl PartialEq for SocketProtocol
Source§impl TryFrom<u32> for SocketProtocol
impl TryFrom<u32> for SocketProtocol
Source§type Error = TryFromPrimitiveError<SocketProtocol>
type Error = TryFromPrimitiveError<SocketProtocol>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for SocketProtocol
impl TryFromPrimitive for SocketProtocol
const NAME: &'static str = "SocketProtocol"
type Primitive = u32
type Error = TryFromPrimitiveError<SocketProtocol>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for SocketProtocol
impl Eq for SocketProtocol
impl StructuralPartialEq for SocketProtocol
Auto Trait Implementations§
impl Freeze for SocketProtocol
impl RefUnwindSafe for SocketProtocol
impl Send for SocketProtocol
impl Sync for SocketProtocol
impl Unpin for SocketProtocol
impl UnwindSafe for SocketProtocol
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