Struct Abort

Source
pub struct Abort;
Expand description

A Strategy prescribing that the program immediately abort on failure.

See also Panic.

Trait Implementations§

Source§

impl Strategy for Abort

Source§

const UNIT: Self = Self

The “unit value” for this type. Read more
Source§

type Result<T, E> = T

The type this strategy returns from fallible methods.
Source§

fn create<T, E>( __strategy_impl_value: Result<T, E>, ) -> <Self as Strategy>::Result<T, E>

Transform a full Result into the desired output. Read more
Source§

fn map<T, E, __STRATEGY_IMPL_U, __STRATEGY_IMPL_F>( v: <Self as Strategy>::Result<T, E>, f: __STRATEGY_IMPL_F, ) -> <Self as Strategy>::Result<__STRATEGY_IMPL_U, E>
where __STRATEGY_IMPL_F: FnOnce(T) -> __STRATEGY_IMPL_U,

Transform an ok result of one type to an ok result of another.
Source§

fn map_err<T, E, __STRATEGY_IMPL_V, __STRATEGY_IMPL_F>( v: <Self as Strategy>::Result<T, E>, _: __STRATEGY_IMPL_F, ) -> <Self as Strategy>::Result<T, __STRATEGY_IMPL_V>
where __STRATEGY_IMPL_F: FnOnce(E) -> __STRATEGY_IMPL_V,

Transform an error result of one type to an error result of another.
Source§

fn and_then<T, E, __STRATEGY_IMPL_U, __STRATEGY_IMPL_F>( v: <Self as Strategy>::Result<T, E>, f: __STRATEGY_IMPL_F, ) -> <Self as Strategy>::Result<__STRATEGY_IMPL_U, E>
where __STRATEGY_IMPL_F: FnOnce(T) -> <Self as Strategy>::Result<__STRATEGY_IMPL_U, E>,

If value is an ok result, transform it through f, flattening the results.
Source§

fn ok<T, E>(value: T) -> Self::Result<T, E>

Create an ok result from a value.
Source§

fn err<T, E>(error: E) -> Self::Result<T, E>

Create an error result from an error.
Source§

fn inspect<T, E, F>(value: Self::Result<T, E>, f: F) -> Self::Result<T, E>
where F: FnOnce(&T),

If value is an ok result, run f on it, returning value unchanged.

Auto Trait Implementations§

§

impl Freeze for Abort

§

impl RefUnwindSafe for Abort

§

impl Send for Abort

§

impl Sync for Abort

§

impl Unpin for Abort

§

impl UnwindSafe for Abort

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.