Skip to main content

SetupError

Struct SetupError 

Source
pub struct SetupError<E: EpochId + 'static, R> {
    pub reason: SetupRefusal,
    pub files: Vec<TargetSetup>,
    pub buffers: Option<Vec<R>>,
    pub provider: Option<Box<dyn DurabilityProvider<WindowsIds<E>>>>,
}
Expand description

A failed construction hands back what it was given. buffers is None only once the buffers have been handed to the kernel and could not be shown to have come back: when the kernel’s registration completion itself failed (windows-ioring-sys drops them then), when no completion arrived (the ring crate leaks them rather than free memory the kernel may hold), or when the registration succeeded and wiring the ring’s delivery then failed (the registration holds them, and has no way to give them back).

That last failure is not reached by this crate’s tests: wiring delivery fails where the system does not support a ring completion event, or the thread pool cannot create a wait.

Fields§

§reason: SetupRefusal

Why construction failed.

§files: Vec<TargetSetup>

The targets, in the order given.

§buffers: Option<Vec<R>>

The buffers, unless the kernel was given them; see above.

§provider: Option<Box<dyn DurabilityProvider<WindowsIds<E>>>>

The provider, if one was given.

Trait Implementations§

Source§

impl<E: EpochId + 'static, R> Debug for SetupError<E, R>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.