#[non_exhaustive]#[repr(u16)]pub enum Type {
Stream = 1,
Seqpacket = 2,
}
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.
Trait Implementations§
Source§impl TryFromPrimitive for Type
impl TryFromPrimitive for Type
Source§impl UnsafeFromPrimitive for Type
impl UnsafeFromPrimitive for Type
type Primitive = u16
Source§unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self
unsafe fn unchecked_transmute_from(number: Self::Primitive) -> Self
Transmutes into an enum from its primitive. Read more
Source§unsafe fn from_unchecked(number: Self::Primitive) -> Self
unsafe fn from_unchecked(number: Self::Primitive) -> Self
👎Deprecated since 0.6.0: Prefer to use
unchecked_transmute_from
, from_unchecked
will be removed in a future release.Transmutes into an enum from its primitive. Read more
impl Copy for Type
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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