Struct GenericAioContext

Source
pub struct GenericAioContext<M: RawMutex, A: IntrusiveAdapter<M, L>, L: DefaultLinkOps<Ops = A::LinkOps> + Default>{ /* private fields */ }
Expand description

Represents running AIO context. Must be kept while AIO is in use. In order to close it, close should be called. It will wait until all related futures are finished. Otherwise, if it just dropped, the termination will be triggered, but some running futures will continue running until they receive the data.

Implementations§

Source§

impl<M: RawMutex, A: IntrusiveAdapter<M, L>, L: DefaultLinkOps<Ops = A::LinkOps> + Default> GenericAioContext<M, A, L>

Source

pub fn available_slots(&self) -> Option<usize>

Number of available AIO slots left in the context

Source

pub async fn close(self)

Close the AIO context and wait for all related running futures to complete.

Trait Implementations§

Source§

impl<M: RawMutex, A: IntrusiveAdapter<M, L>, L: DefaultLinkOps<Ops = A::LinkOps> + Default> Debug for GenericAioContext<M, A, L>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<M, A, L> Freeze for GenericAioContext<M, A, L>
where <A as Adapter>::LinkOps: Sized,

§

impl<M, A, L> !RefUnwindSafe for GenericAioContext<M, A, L>

§

impl<M, A, L> Send for GenericAioContext<M, A, L>
where <A as Adapter>::LinkOps: Sized, M: Sync + Send, A: Send, L: Send,

§

impl<M, A, L> Sync for GenericAioContext<M, A, L>
where <A as Adapter>::LinkOps: Sized, M: Sync + Send, A: Send, L: Send,

§

impl<M, A, L> Unpin for GenericAioContext<M, A, L>
where <A as Adapter>::LinkOps: Sized,

§

impl<M, A, L> !UnwindSafe for GenericAioContext<M, A, L>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.