pub struct Uring;Implementations§
Trait Implementations§
Source§impl Control for Uring
impl Control for Uring
type Target = Fixed
type Owned<T: Token> = Owned<T>
type Poll<'a, T: Token> = Poll<'a, T>
fn nop<T: Token>(complete: T) -> Self::Owned<T>
fn cancel<T: Token>(target: T, complete: T) -> Self::Owned<T>
fn close<T: Token>(slot: Self::Target, complete: T) -> Self::Owned<T>
Source§impl<C, G> Create<C, G> for Uringwhere
C: Config<G>,
C::Layout: Canary,
<<C as Context>::Token as Codec>::Context: Build<Errno<Register<6>>>,
<<<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>>>>,
Ring<C::Token>: Validate<C::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::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>>>,
Session<C::Token, C::Layout>: Create<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Ring = Ring<C::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>>>,
impl<C, G> Create<C, G> for Uringwhere
C: Config<G>,
C::Layout: Canary,
<<C as Context>::Token as Codec>::Context: Build<Errno<Register<6>>>,
<<<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>>>>,
Ring<C::Token>: Validate<C::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::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>>>,
Session<C::Token, C::Layout>: Create<<<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Ring = Ring<C::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>>>,
type Receive = <Uring as Source>::Queue<<C as Config<G>>::Key, <C as Config<G>>::Index>
type Error = Failure<<Ring<<C as Context>::Token> as Create>::Setup, <Ring<<C as Context>::Token> as Create>::Map, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary, Resources<<C as Context>::Token, <C as Context>::Layout, <<<C as Context>::Token as Codec>::Context as Build<Errno<Register<6>>>>::Primary>, 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>>>
Source§impl Directory for Uring
impl Directory for Uring
type Stream = Stream
fn from_fd<E: From<Errno>>(file: OwnedFd) -> Result<Stream, OpenError<E>>
fn descriptor(stream: &Stream) -> Descriptor
fn next<E: From<Errno>>( stream: &mut Stream, ) -> Result<Option<Entry<'_>>, ReadError<E>>
fn open_dir<E>(path: &CStr) -> Result<Self::Stream, OpenError<E>>
Source§impl File for Uring
impl File for Uring
type Options = OpenHow
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 remove_dir_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#0}>, offset: Offset, ) -> Result<U32<0, dope_sys::::io::file::File::write_at::{constant#2}>, E>
Source§impl<T: Copy + Eq, S: Copy + Eq, F: Copy + Eq> Observe<T, S, F> for Uring
impl<T: Copy + Eq, S: Copy + Eq, F: Copy + Eq> Observe<T, S, F> for Uring
type Observation = Observed<T>
Source§impl Prepare for Uring
impl Prepare for Uring
type Handle = OwnedFd
type Fast = NonZero<i32>
fn fast_open(depth: Option<NonZero<i32>>) -> Result<Option<Self::Fast>, Error>
fn open(domain: Domain, kind: Kind) -> Result<Self::Handle, Create>
fn listener(domain: Domain) -> Result<Self::Handle, Create>
fn adopt(file: OwnedFd) -> Result<Self::Handle, Setup>
Source§fn into_fd(handle: Self::Handle) -> OwnedFd
fn into_fd(handle: Self::Handle) -> OwnedFd
Transfers the prepared socket’s descriptor without changing its native configuration.
fn set_fast(file: BorrowedFd<'_>, fast: Self::Fast) -> Result<(), Errno>
Source§impl Socket for Uring
impl Socket for Uring
const MAX_IOVECS: usize
type Error = Errno
type Records = Packet
fn socket(domain: c_int, kind: c_int) -> Result<OwnedFd, Self::Error>
Source§fn pair() -> Result<(OwnedFd, OwnedFd), Error>
fn pair() -> Result<(OwnedFd, OwnedFd), Error>
Creates exclusively owned endpoints using this backend’s record transport.
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 reset_on_close<E>(file: BorrowedFd<'_>) -> Result<(), E>
fn reset_on_close<E>(file: BorrowedFd<'_>) -> 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 is_listening<E>(file: BorrowedFd<'_>) -> Result<bool, E>
fn is_listening<E>(file: BorrowedFd<'_>) -> Result<bool, E>
Whether one adopted descriptor is already listening.
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.
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 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 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>
Source§fn send_to<'a, E>(
file: BorrowedFd<'_>,
input: &'a [u8],
address: Addr<'_>,
) -> Result<&'a [u8], E>
fn send_to<'a, E>( file: BorrowedFd<'_>, input: &'a [u8], address: Addr<'_>, ) -> Result<&'a [u8], E>
Sends one datagram to the retained native destination.
Source§fn recv_from<'a, E>(
file: BorrowedFd<'_>,
output: &'a mut [u8],
address: &mut Storage,
) -> Result<&'a mut [u8], E>
fn recv_from<'a, E>( file: BorrowedFd<'_>, output: &'a mut [u8], address: &mut Storage, ) -> Result<&'a mut [u8], E>
Receives one datagram and its source into caller-owned storage.
fn try_pair<E>(kind: i32) -> Result<(OwnedFd, OwnedFd), E>
Source§impl Source for Uring
impl Source for Uring
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 Uring
impl Source for Uring
const PROVIDED: u16 = 1
const CANARY: u16 = 2
type Entry = Entry
type Index = Buffer
type Context<L: Receive> = Context<L>
type Canary<L: Canary> = Canary<L>
type Cleanup<L: Receive> = Cleanup<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 Uring
impl Source for Uring
type Decoded<T: Copy, E> = Decoded<T, E, ()>
type Ready<T: Token, L: Receive> = Ready<T, L>
type Packet<T: Copy, B> = Packet<T, B>
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 Uring
impl Source for Uring
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 Uring
impl Source for Uring
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, Observed<T>, Errno<Enter>>>
type Resources<T: Codec, L: Canary, P: Copy + From<Self::Primary> + From<Error>> = Resources<T, L, P>
Source§impl Source for Uring
impl Source for Uring
type Control = Control
Source§type Combined = Combined
type Combined = Combined
Owns the selected source and exactly the optional segmentation capability supplied.
fn control(source: Address) -> Self::Control
fn compose(source: Control, gso: Option<Control>) -> Combined
fn release(control: Combined) -> (Control, Option<Control>)
fn bytes(control: &mut Combined) -> &[u8] ⓘ
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 Thread for Uring
impl Thread for Uring
type Timer = Timer
type Receiver = Receiver
type Cpus = Cpus
fn current() -> Result<Self::Cpus, Error>
fn bind(cpu: Cpu) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for Uring
impl RefUnwindSafe for Uring
impl Send for Uring
impl Sync for Uring
impl Unpin for Uring
impl UnsafeUnpin for Uring
impl UnwindSafe for Uring
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<T> Fd for Twhere
T: Source,
impl<T> Fd for Twhere
T: Source,
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.