pub struct Backend;Implementations§
Trait Implementations§
Source§impl Completion for Backend
impl Completion for Backend
Source§impl Control for Backend
impl Control for Backend
type Target = Fixed
type Owned<T: Token> = Owned<T>
type Poll<'a, T: Token> = Poll<'a, T>
fn nop<T>(complete: T) -> <Backend as Control>::Owned<T>where
T: Token,
fn close<T>(
slot: <Backend as Control>::Target,
complete: T,
) -> <Backend as Control>::Owned<T>where
T: Token,
Source§impl<C, G, F> Create<C, G, Rejected<F, Resources<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>, Released<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed>>> for Backendwhere
Ring<<C as Context>::Token>: Validate<<C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Probe = <<<C as Context>::Token as Codec>::Context as Context>::Probe, Cleanup = Result<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Recover<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>>> + Validate<<C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Range = Range, Probe = <<<C as Context>::Token as Codec>::Context as Context>::Probe, Update = Errno<Register<6>>, Cleanup = Result<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Recover<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>>, Release = Result<(<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Fixed), Released<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed>>>,
C: Config<G>,
<C as Context>::Layout: Canary,
<<C as Context>::Token as Codec>::Context: Build<Errno<Register<6>>>,
F: From<Error> + From<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary> + From<(<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Fixed)>,
Session<<C as Context>::Token, <C as Context>::Layout>: Create<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Ring = Ring<<C as Context>::Token>, Cleanup = Resources<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>> + Validate<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Update = Errno<Register<6>>, Cleanup = Result<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Recover<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>>, Release = Result<(<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Fixed), Released<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed>>>,
<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary: From<Primary<Cause<Errno<Setup>, Errno<Map>>, Errno<Register<20>>, Errno<Register<22>>>> + From<Error> + From<Rejection<Errno<Register<24>>, Errno<Register<13>>, Errno<Register<25>>>>,
impl<C, G, F> Create<C, G, Rejected<F, Resources<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>, Released<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed>>> for Backendwhere
Ring<<C as Context>::Token>: Validate<<C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Probe = <<<C as Context>::Token as Codec>::Context as Context>::Probe, Cleanup = Result<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Recover<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>>> + Validate<<C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Range = Range, Probe = <<<C as Context>::Token as Codec>::Context as Context>::Probe, Update = Errno<Register<6>>, Cleanup = Result<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Recover<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>>, Release = Result<(<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Fixed), Released<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed>>>,
C: Config<G>,
<C as Context>::Layout: Canary,
<<C as Context>::Token as Codec>::Context: Build<Errno<Register<6>>>,
F: From<Error> + From<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary> + From<(<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Fixed)>,
Session<<C as Context>::Token, <C as Context>::Layout>: Create<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Ring = Ring<<C as Context>::Token>, Cleanup = Resources<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>> + Validate<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Update = Errno<Register<6>>, Cleanup = Result<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Recover<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>>, Release = Result<(<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed, Fixed), Released<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed>>>,
<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary: From<Primary<Cause<Errno<Setup>, Errno<Map>>, Errno<Register<20>>, Errno<Register<22>>>> + From<Error> + From<Rejection<Errno<Register<24>>, Errno<Register<13>>, Errno<Register<25>>>>,
type Receive = <Backend as Source>::Queue<<C as Config<G>>::Key, <C as Config<G>>::Index>
Source§unsafe fn try_new(
config: &G,
) -> Result<(Engine<C>, Context<<C as Context>::Layout>, <Backend as Source>::Queue<<C as Config<G>>::Key, <C as Config<G>>::Index>), Rejected<F, Resources<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>, Released<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed>>>
unsafe fn try_new( config: &G, ) -> Result<(Engine<C>, Context<<C as Context>::Layout>, <Backend as Source>::Queue<<C as Config<G>>::Key, <C as Config<G>>::Index>), Rejected<F, Resources<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>, Released<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Removed>>>
Safety Read more
Source§impl Directory for Backend
impl Directory for Backend
type Stream = Stream
type Watch = Watch
type Events<'a> = Events<'a>
Source§unsafe fn watch_events<'a>(
_: &<Backend as Directory>::Watch,
bytes: &'a [u8],
) -> <Backend as Directory>::Events<'a>
unsafe fn watch_events<'a>( _: &<Backend as Directory>::Watch, bytes: &'a [u8], ) -> <Backend as Directory>::Events<'a>
Safety Read more
fn from_fd<E>(file: OwnedFd) -> Result<Stream, OpenError<E>>
fn descriptor(stream: &Stream) -> Descriptor
fn next(stream: &mut Stream) -> Result<Option<Entry<'_>>, Errno>
fn open_dir<E>(path: &CStr) -> Result<Self::Stream, OpenError<E>>
Source§impl File for Backend
impl File for Backend
type Options = OpenHow
type Metadata = Metadata
type Request<'a> = Borrowed<'a>
fn open<E>(path: &CStr, flags: Open, mode: Mode) -> Result<OwnedFd, E>
fn metadata<E>(file: BorrowedFd<'_>) -> Result<Metadata, E>
fn stat<E>(path: &CStr) -> Result<Metadata, E>
fn mkdir<E>(path: &CStr, mode: Mode) -> Result<(), E>
Source§fn metadata_at<E>(
dir: Option<BorrowedFd<'_>>,
name: &CStr,
) -> Result<Metadata, E>
fn metadata_at<E>( dir: Option<BorrowedFd<'_>>, name: &CStr, ) -> Result<Metadata, E>
Classifies the named entry itself while retaining its parent directory.
fn unlink<E>(path: &CStr) -> Result<(), E>
fn rename<E>(from: &CStr, to: &CStr) -> Result<(), E>
Source§fn try_lock<E>(file: BorrowedFd<'_>) -> Result<(), E>
fn try_lock<E>(file: BorrowedFd<'_>) -> Result<(), E>
Attempts an exclusive advisory lock without waiting for its current owner.
fn sync<E>(file: BorrowedFd<'_>) -> Result<(), E>
fn truncate<E>(file: BorrowedFd<'_>, len: i64) -> Result<(), E>
fn unlink_at<E>(dir: BorrowedFd<'_>, name: &CStr) -> Result<(), E>
fn rmdir_at<E>(dir: Option<BorrowedFd<'_>>, name: &CStr) -> Result<(), E>
fn open_at<E>( dir: BorrowedFd<'_>, name: &CStr, flags: Open, mode: Mode, ) -> Result<OwnedFd, E>
fn rename_at<E>(dir: BorrowedFd<'_>, old: &CStr, new: &CStr) -> Result<(), E>
Source§fn read_at<'a, E>(
file: BorrowedFd<'_>,
output: &'a mut [u8],
offset: Offset,
) -> Result<&'a mut [u8], E>
fn read_at<'a, E>( file: BorrowedFd<'_>, output: &'a mut [u8], offset: Offset, ) -> Result<&'a mut [u8], E>
Reads one prefix without changing the descriptor’s current position.
fn write_at<E>( file: BorrowedFd<'_>, input: Prefix<'_, dope_sys::::io::file::File::write_at::{constant#2}>, offset: Offset, ) -> Result<U32<0, dope_sys::::io::file::File::write_at::{constant#1}>, E>
Source§impl Prepare for Backend
impl Prepare for Backend
type Handle = OwnedFd
type Fast = NonZero<i32>
fn fast_open( depth: Option<NonZero<i32>>, ) -> Result<Option<<Backend as Prepare>::Fast>, Error>
fn open( domain: Domain, kind: Kind, ) -> Result<<Backend as Prepare>::Handle, Create>
fn listener(domain: Domain) -> Result<<Backend as Prepare>::Handle, Create>
fn adopt(file: OwnedFd) -> Result<<Backend as Prepare>::Handle, Setup>
Source§fn into_fd(handle: <Backend as Prepare>::Handle) -> OwnedFd
fn into_fd(handle: <Backend as Prepare>::Handle) -> OwnedFd
Transfers the prepared socket’s descriptor without changing its native configuration.
fn set_fast( file: BorrowedFd<'_>, fast: <Backend as Prepare>::Fast, ) -> Result<(), Errno>
Source§impl Socket for Backend
impl Socket for Backend
const MAX_IOVECS: usize
type Error = Errno
fn socket(domain: i32, kind: i32) -> Result<OwnedFd, <Backend as Socket>::Error>
Source§fn pair() -> Result<(OwnedFd, OwnedFd), Error>
fn pair() -> Result<(OwnedFd, OwnedFd), Error>
Creates exclusively owned local socket endpoints.
Source§fn datagram<E>(domain: Domain) -> Result<OwnedFd, E>
fn datagram<E>(domain: Domain) -> Result<OwnedFd, E>
Creates one datagram descriptor without changing its descriptor flags.
fn try_open<E>(domain: i32, kind: i32, protocol: i32) -> Result<OwnedFd, E>
fn listen<E>(file: BorrowedFd<'_>, backlog: i32) -> Result<(), E>
Source§fn shutdown<E>(file: BorrowedFd<'_>, how: How) -> Result<(), E>
fn shutdown<E>(file: BorrowedFd<'_>, how: How) -> Result<(), E>
Half-closes one socket in the requested direction.
Source§fn peer_addr<E>(file: BorrowedFd<'_>, address: &mut Storage) -> Result<(), E>
fn peer_addr<E>(file: BorrowedFd<'_>, address: &mut Storage) -> Result<(), E>
Observes the connected peer into caller-owned native address storage.
Source§fn send_quiet<'a, E>(
file: BorrowedFd<'_>,
input: &'a [u8],
) -> Result<&'a [u8], E>
fn send_quiet<'a, E>( file: BorrowedFd<'_>, input: &'a [u8], ) -> Result<&'a [u8], E>
Sends one byte string without raising the termination signal.
Source§fn send_now<'a, E>(file: BorrowedFd<'_>, input: &'a [u8]) -> Result<&'a [u8], E>
fn send_now<'a, E>(file: BorrowedFd<'_>, input: &'a [u8]) -> Result<&'a [u8], E>
Sends without waiting or raising the termination signal.
fn send<'a, const FLAGS: i32, E>( file: BorrowedFd<'_>, input: &'a [u8], ) -> Result<&'a [u8], E>
fn recv<'a, const FLAGS: i32, E>( file: BorrowedFd<'_>, output: &'a mut [u8], ) -> Result<&'a mut [u8], E>
fn recv_now<'a, E>( file: BorrowedFd<'_>, output: &'a mut [u8], ) -> Result<&'a mut [u8], E>
Source§impl Source for Backend
impl Source for Backend
Source§const MAX_IN_FLIGHT: NonZero<usize> = num::NonZero<usize>::MAX
const MAX_IN_FLIGHT: NonZero<usize> = num::NonZero<usize>::MAX
Maximum simultaneous native accept operations on one listener.
type Failure<F: From<Errno>> = Errno
Source§fn is_retryable(error: Errno) -> bool
fn is_retryable(error: Errno) -> bool
Whether one native accept failure permits another attempt on the listener.
Resource exhaustion never permits an unconditional retry; retain its exact error.
Source§impl Source for Backend
impl Source for Backend
const PROVIDED: u16 = 1
const CANARY: u16 = 2
type Index = Buffer
type Context<L: Receive> = Context<L>
type Canary<L: Canary> = Canary<L>
type Producer<L: Receive> = Producer<L>
type Pending<E: Extent> = Selected<E, <E as Extent>::Capacity>
type Complete<E: Extent> = Selected<E, <E as Extent>::Length>
Source§impl Source for Backend
impl Source for Backend
const KEEP_IDLE: i32 = libc::TCP_KEEPIDLE
type Listening = Errno
Source§fn is_listening(
file: BorrowedFd<'_>,
) -> Result<bool, <Backend as Source>::Listening>
fn is_listening( file: BorrowedFd<'_>, ) -> Result<bool, <Backend as Source>::Listening>
Whether one adopted descriptor is already listening.
Source§fn reset<E>(file: impl AsFd) -> Result<(), E>
fn reset<E>(file: impl AsFd) -> Result<(), E>
Makes closing this exclusively owned connection send a reset.
Source§fn kind<E>(file: BorrowedFd<'_>) -> Result<Type, E>
fn kind<E>(file: BorrowedFd<'_>) -> Result<Type, E>
Observes the socket type of one adopted descriptor.
Source§fn take_error(file: BorrowedFd<'_>) -> Result<Option<Errno>, Errno>
fn take_error(file: BorrowedFd<'_>) -> Result<Option<Errno>, Errno>
Clears the pending socket error and returns its positive errno, if any.
Source§fn set_reuse<E>(file: BorrowedFd<'_>, reuse: Reuse) -> Result<(), E>
fn set_reuse<E>(file: BorrowedFd<'_>, reuse: Reuse) -> Result<(), E>
Admits the requested address reuse on one socket.
fn get_option<const OPTION: i32, E>(file: BorrowedFd<'_>) -> Result<i32, E>
fn set_option<E>( file: BorrowedFd<'_>, level: i32, option: i32, value: &i32, ) -> Result<(), E>
fn option(kind: Kind) -> (i32, i32)
fn set(fd: BorrowedFd<'_>, kind: Kind, value: &Value) -> Result<(), Errno>
Source§impl Source for Backend
impl Source for Backend
type Ready<T: Token, L: Receive> = Ready<T, L>
type Poll = Poll<Errno<Enter>, Errno<Register<24>>>
type Enter<'a, T: 'a> = Enter<'a, T>
type Entry<T> = Entry<T>
type Message<'a, const NAME: usize, const CONTROL: usize> = Output<'a, NAME, CONTROL>
type Ring<T: Token> = Ring<T>
Source§impl Source for Backend
impl Source for Backend
type Range = Range
type Release<T: Codec, L: Canary, P: Copy> = Released<T, L, P>
type Cleanup<T: Codec, L: Canary, P: Copy> = Recover<T, L, P>
type Payload = Payload
type Accept<T: Codec> = Accepted<T>
type Session<T: Codec, L: Canary> = Session<T, L>
type Outcome<T: Token, P: Copy> = Outcome<T, P>
type Waiting<T: Codec, S> = Waiting<S, T>
Source§impl Source for Backend
impl Source for Backend
type Primary = Primary<Cause<Errno<Setup>, Errno<Map>>, Errno<Register<20>>, Errno<Register<22>>>
type Failure<T: Codec> = Failure<Storage<Errno<Unmap>>, Cause<<<T as Codec>::Context as Context>::Probe, Parts<T, Outcome, Flags>, Errno<Enter>>>
type Resources<T: Codec, L: Canary, P: Copy + From<<Backend as Source>::Primary> + From<Error>> = Resources<T, L, P>
Source§impl Source for Backend
impl Source for Backend
type Control = Source
Source§type Combined = Combined
type Combined = Combined
Owns the selected source and exactly the optional segmentation capability supplied.
fn compose(source: Source, gso: Option<Control>) -> Combined
fn release(control: Combined) -> (Source, Option<Control>)
Source§fn source(
bind: SocketAddr,
peer: SocketAddr,
) -> Result<(Address, Self::Control), Error>
fn source( bind: SocketAddr, peer: SocketAddr, ) -> Result<(Address, Self::Control), Error>
Preserves an explicit source; resolves wildcard binds once on a separate socket.
Source§impl Source for Backend
impl Source for Backend
const STORAGE: <Backend as Source>::Storage
type Storage = [sock_filter; 228]
type Install<'a> = Installer<'a>
type Ready = ()
type Lease<'a> = BorrowedFd<'a>
fn try_prepare( filter: &mut <Backend as Source>::Storage, plan: Plan, ) -> Result<(<Backend as Source>::Install<'_>, <Backend as Source>::Ready), Plan>
fn lease<'a>(_: &(), socket: BorrowedFd<'a>) -> <Backend as Source>::Lease<'a>
Source§impl Thread for Backend
impl Thread for Backend
Auto Trait Implementations§
impl Forget for Backend
impl Freeze for Backend
impl Move for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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
Source§impl<S> Fd for Swhere
S: Source,
impl<S> Fd for Swhere
S: Source,
fn try_limit() -> Result<(u64, u64), Errno>
Source§fn update<E>(file: BorrowedFd<'_>) -> Result<(), E>where
E: Flags,
fn update<E>(file: BorrowedFd<'_>) -> Result<(), E>where
E: Flags,
Adds a descriptor flag, retrying only each interrupted native attempt.
Source§fn remove<E>(file: BorrowedFd<'_>) -> Result<(), E>where
E: Flags,
fn remove<E>(file: BorrowedFd<'_>) -> Result<(), E>where
E: Flags,
Removes one descriptor flag, preserving all other native flags.
Source§fn try_update<E>(file: BorrowedFd<'_>) -> Result<(), E>where
E: Flags,
fn try_update<E>(file: BorrowedFd<'_>) -> Result<(), E>where
E: Flags,
Adds a descriptor flag with one get attempt followed by one set attempt.
Source§fn close<E>(file: OwnedFd) -> Result<(), E>
fn close<E>(file: OwnedFd) -> Result<(), E>
Consumes descriptor ownership through one native close attempt.
The returned errno is observable; ownership is never issued for a retry.
fn duplicate<E>(file: BorrowedFd<'_>) -> Result<OwnedFd, E>
fn set<const COMMAND: i32, E>(file: BorrowedFd<'_>, flags: i32) -> Result<(), E>
Source§fn set_retry<const COMMAND: i32, E>(
file: BorrowedFd<'_>,
flags: i32,
) -> Result<(), E>
fn set_retry<const COMMAND: i32, E>( file: BorrowedFd<'_>, flags: i32, ) -> Result<(), E>
Applies scalar descriptor flags, retrying only interrupted attempts.