[][src]Struct evaluator::DummyEval

pub struct DummyEval<Out> { /* fields omitted */ }

Implements dummy evaluation of clonable and non-clonable types: every time the eval() method is called, a fixed value is returned.

Trait Implementations

impl<Out> Evaluator for DummyEval<Out> where
    Out: Clone
[src]

type Output = Out

The type that the evaluator evaluates to.

fn eval(&mut self) -> Self::Output[src]

Evaluates and returns the result. This includes the overhead of cloning the value, because the fixed value must be preserved.

Because caching evaluators, as their name suggests, store the cached value inside themselves, a mutable borrow of self is required.

Panics

May panic only if cloning of the inner value panics.

impl<Out> From<Out> for DummyEval<Out>[src]

fn from(value: Out) -> Self[src]

Constructs the evaluator from the specified dummy value.

Auto Trait Implementations

impl<Out> RefUnwindSafe for DummyEval<Out> where
    Out: RefUnwindSafe

impl<Out> Send for DummyEval<Out> where
    Out: Send

impl<Out> Sync for DummyEval<Out> where
    Out: Sync

impl<Out> Unpin for DummyEval<Out> where
    Out: Unpin

impl<Out> UnwindSafe for DummyEval<Out> where
    Out: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<!> for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.