pub struct Type(/* private fields */);
Expand description
Specification of communication semantics on a socket.
This is a newtype wrapper around an integer which provides a nicer API in
addition to an injection point for documentation. Convenience constructors
such as Type::stream
, Type::dgram
, etc, are provided to avoid reaching
into libc for various constants.
This type is freely interconvertible with C’s int
type, however, if a raw
value needs to be provided.
Implementations§
Source§impl Type
Unix only API.
impl Type
Unix only API.
Sourcepub fn non_blocking(self) -> Type
pub fn non_blocking(self) -> Type
Set SOCK_NONBLOCK
on the Type
.
§Notes
This function is only available on Android, DragonFlyBSD, FreeBSD, Linux, NetBSD and OpenBSD.
Trait Implementations§
impl Copy 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