Struct LeftElement

Source
pub struct LeftElement<L: Debug> { /* private fields */ }
Expand description

Structure to initiate the Should structure , when the should method is called. It is used by the macros.

Implementations§

Source§

impl<L: Debug> LeftElement<L>

Source

pub fn new( left: L, stringified: &'static str, location: &'static str, case: Option<&'static str>, ) -> Self

Creates a new LeftElement. Not intended to be used directly, but through the custom attributes or the fact_ macro.

Source

pub fn should(self) -> Should<L>

Initiates a new assertion.

Trait Implementations§

Source§

impl<L: Debug + Debug> Debug for LeftElement<L>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<L> Freeze for LeftElement<L>
where L: Freeze,

§

impl<L> RefUnwindSafe for LeftElement<L>
where L: RefUnwindSafe,

§

impl<L> Send for LeftElement<L>
where L: Send,

§

impl<L> Sync for LeftElement<L>
where L: Sync,

§

impl<L> Unpin for LeftElement<L>
where L: Unpin,

§

impl<L> UnwindSafe for LeftElement<L>
where L: 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> PrintDebug for T
where T: Debug,

Source§

fn dbg(&self) -> String

Display the user’s input as a debug string.
Source§

impl<L> ShouldExtension<L> for L
where L: Debug,

Source§

fn should(self) -> Should<L>

Initiates an assertion. Note that this method should not be used alone, but: 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.