Skip to main content

Expected

Struct Expected 

Source
pub struct Expected<T: ?Sized, P: Predicate<T> + ?Sized> { /* private fields */ }
Expand description

Represents the expected type used for formatting.

Returned by the expected method of the PredicateExpected extension trait.

This type delegates the following traits:

Implementations§

Source§

impl<T: ?Sized, P: Predicate<T> + ?Sized> Expected<T, P>

Source

pub const fn new() -> Self

Constructs Self.

Trait Implementations§

Source§

impl<T: ?Sized, P: Predicate<T> + ?Sized> Debug for Expected<T, P>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T: ?Sized, P: Predicate<T> + ?Sized> Default for Expected<T, P>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T: ?Sized, P: Predicate<T> + ?Sized> Display for Expected<T, P>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T, P> Freeze for Expected<T, P>
where T: ?Sized, P: ?Sized,

§

impl<T, P> RefUnwindSafe for Expected<T, P>

§

impl<T, P> Send for Expected<T, P>
where T: Send + ?Sized, P: Send + ?Sized,

§

impl<T, P> Sync for Expected<T, P>
where T: Sync + ?Sized, P: Sync + ?Sized,

§

impl<T, P> Unpin for Expected<T, P>
where T: Unpin + ?Sized, P: Unpin + ?Sized,

§

impl<T, P> UnsafeUnpin for Expected<T, P>
where T: ?Sized, P: ?Sized,

§

impl<T, P> UnwindSafe for Expected<T, P>
where T: UnwindSafe + ?Sized, P: UnwindSafe + ?Sized,

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> Check for T
where T: ?Sized,

Source§

fn satisfies<P: Predicate<Self> + ?Sized>(&self) -> bool

Checks whether the Self value satisfies the given predicate. 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> Refine for T
where T: ?Sized,

Source§

fn refine_ref<R: Refining<Value = Self> + ?Sized>( &self, ) -> RecoverableRefinementRef<'_, R>

Refines the given value with R by reference. Read more
Source§

fn refine<R: Refining<Value = Self>>(self) -> RecoverableRefinement<R>
where Self: Sized,

Refines the given value with R. Read more
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.