pub struct LocalDgram;
Expand description
The datagram-oriented UNIX domain protocol.
§Example
Create a server and client sockets.
use asyncio::{IoContext, Endpoint};
use asyncio::local::{LocalDgram, LocalDgramEndpoint, LocalDgramSocket};
let ctx = &IoContext::new().unwrap();
let ep = LocalDgramEndpoint::new("example.sock").unwrap();
let sv = LocalDgramSocket::new(ctx, LocalDgram).unwrap();
sv.bind(&ep).unwrap();
let cl = LocalDgramSocket::new(ctx, ep.protocol()).unwrap();
cl.connect(&ep).unwrap();
Trait Implementations§
Source§impl Clone for LocalDgram
impl Clone for LocalDgram
Source§fn clone(&self) -> LocalDgram
fn clone(&self) -> LocalDgram
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 LocalDgram
impl Debug for LocalDgram
Source§impl Endpoint<LocalDgram> for LocalEndpoint<LocalDgram>
impl Endpoint<LocalDgram> for LocalEndpoint<LocalDgram>
fn protocol(&self) -> LocalDgram
Source§impl LocalProtocol for LocalDgram
impl LocalProtocol for LocalDgram
type Socket = DgramSocket<LocalDgram>
Source§impl Ord for LocalDgram
impl Ord for LocalDgram
Source§fn cmp(&self, other: &LocalDgram) -> Ordering
fn cmp(&self, other: &LocalDgram) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LocalDgram
impl PartialEq for LocalDgram
Source§impl PartialOrd for LocalDgram
impl PartialOrd for LocalDgram
Source§impl Protocol for LocalDgram
impl Protocol for LocalDgram
type Endpoint = LocalEndpoint<LocalDgram>
Source§fn family_type(&self) -> i32
fn family_type(&self) -> i32
Reurns a value suitable for passing as the domain argument.
Source§fn socket_type(&self) -> i32
fn socket_type(&self) -> i32
Returns a value suitable for passing as the type argument.
Source§fn protocol_type(&self) -> i32
fn protocol_type(&self) -> i32
Returns a value suitable for passing as the protocol argument.
unsafe fn uninitialized(&self) -> Self::Endpoint
impl Eq for LocalDgram
impl StructuralPartialEq for LocalDgram
Auto Trait Implementations§
impl Freeze for LocalDgram
impl RefUnwindSafe for LocalDgram
impl Send for LocalDgram
impl Sync for LocalDgram
impl Unpin for LocalDgram
impl UnwindSafe for LocalDgram
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