pub struct LocalSeqPacket;
Expand description
The seq-packet protocol.
§Example
Create a server and client sockets.
use asyncio::{IoContext, Endpoint};
use asyncio::local::{LocalSeqPacket, LocalSeqPacketEndpoint, LocalSeqPacketSocket, LocalSeqPacketListener};
let ctx = &IoContext::new().unwrap();
let ep = LocalSeqPacketEndpoint::new("example.sock").unwrap();
let sv = LocalSeqPacketListener::new(ctx, LocalSeqPacket).unwrap();
sv.bind(&ep).unwrap();
sv.listen().unwrap();
let cl = LocalSeqPacketSocket::new(ctx, ep.protocol()).unwrap();
cl.connect(&ep).unwrap();
Trait Implementations§
Source§impl Clone for LocalSeqPacket
impl Clone for LocalSeqPacket
Source§fn clone(&self) -> LocalSeqPacket
fn clone(&self) -> LocalSeqPacket
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 LocalSeqPacket
impl Debug for LocalSeqPacket
Source§impl Endpoint<LocalSeqPacket> for LocalEndpoint<LocalSeqPacket>
impl Endpoint<LocalSeqPacket> for LocalEndpoint<LocalSeqPacket>
fn protocol(&self) -> LocalSeqPacket
Source§impl LocalProtocol for LocalSeqPacket
impl LocalProtocol for LocalSeqPacket
Source§impl Ord for LocalSeqPacket
impl Ord for LocalSeqPacket
Source§fn cmp(&self, other: &LocalSeqPacket) -> Ordering
fn cmp(&self, other: &LocalSeqPacket) -> 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 LocalSeqPacket
impl PartialEq for LocalSeqPacket
Source§impl PartialOrd for LocalSeqPacket
impl PartialOrd for LocalSeqPacket
Source§impl Protocol for LocalSeqPacket
impl Protocol for LocalSeqPacket
type Endpoint = LocalEndpoint<LocalSeqPacket>
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 LocalSeqPacket
impl StructuralPartialEq for LocalSeqPacket
Auto Trait Implementations§
impl Freeze for LocalSeqPacket
impl RefUnwindSafe for LocalSeqPacket
impl Send for LocalSeqPacket
impl Sync for LocalSeqPacket
impl Unpin for LocalSeqPacket
impl UnwindSafe for LocalSeqPacket
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