Skip to main content

MaybeRegistered

Enum MaybeRegistered 

Source
pub enum MaybeRegistered<R, F> {
    Registered(R),
    Fallback(F),
}

Variants§

§

Registered(R)

§

Fallback(F)

Trait Implementations§

Source§

impl<R: IoBuf, F: IoBuf> IoBuf for MaybeRegistered<R, F>

Source§

fn stable_ptr(&self) -> *const u8

Returns a stable pointer to the start of the initialized data.
Source§

fn bytes_init(&self) -> usize

Number of initialized bytes, valid to read.
Source§

fn bytes_total(&self) -> usize

Total capacity, including uninitialized memory. This is what gets passed to the kernel for reads.
Source§

fn slice(self, range: impl RangeBounds<usize>) -> Slice<Self>
where Self: Sized,

Returns a bounded view into this buffer.
Source§

impl<R: IoBufMut, F: IoBufMut> IoBufMut for MaybeRegistered<R, F>

Source§

fn stable_mut_ptr(&mut self) -> *mut u8

Returns a stable mutable pointer to the start of the buffer.
Source§

unsafe fn set_init(&mut self, pos: usize)

Mark the first pos bytes as initialized. Read more
Source§

fn clear(&mut self)

Clear this buffer, setting the initialized bytes to 0.

Auto Trait Implementations§

§

impl<R, F> Freeze for MaybeRegistered<R, F>
where R: Freeze, F: Freeze,

§

impl<R, F> RefUnwindSafe for MaybeRegistered<R, F>

§

impl<R, F> Send for MaybeRegistered<R, F>
where R: Send, F: Send,

§

impl<R, F> Sync for MaybeRegistered<R, F>
where R: Sync, F: Sync,

§

impl<R, F> Unpin for MaybeRegistered<R, F>
where R: Unpin, F: Unpin,

§

impl<R, F> UnsafeUnpin for MaybeRegistered<R, F>
where R: UnsafeUnpin, F: UnsafeUnpin,

§

impl<R, F> UnwindSafe for MaybeRegistered<R, F>
where R: UnwindSafe, F: UnwindSafe,

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.