Enum nix::sys::socket::SockProtocol
source · #[repr(i32)]#[non_exhaustive]pub enum SockProtocol {
Tcp,
Udp,
Raw,
KextEvent,
KextControl,
}
Available on crate feature
socket
only.Expand description
Constants used in socket
and socketpair
to specify the protocol to use.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Tcp
TCP protocol (ip(7))
Udp
UDP protocol (ip(7))
Raw
Raw sockets (raw(7))
KextEvent
Allows applications and other KEXTs to be notified when certain kernel events occur (ref)
KextControl
Allows applications to configure and control a KEXT (ref)
Trait Implementations§
source§impl Clone for SockProtocol
impl Clone for SockProtocol
source§fn clone(&self) -> SockProtocol
fn clone(&self) -> SockProtocol
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 SockProtocol
impl Debug for SockProtocol
source§impl Hash for SockProtocol
impl Hash for SockProtocol
source§impl PartialEq<SockProtocol> for SockProtocol
impl PartialEq<SockProtocol> for SockProtocol
source§fn eq(&self, other: &SockProtocol) -> bool
fn eq(&self, other: &SockProtocol) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SockProtocol
impl Eq for SockProtocol
impl StructuralEq for SockProtocol
impl StructuralPartialEq for SockProtocol
Auto Trait Implementations§
impl RefUnwindSafe for SockProtocol
impl Send for SockProtocol
impl Sync for SockProtocol
impl Unpin for SockProtocol
impl UnwindSafe for SockProtocol
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