pub struct TestHelper<T>(pub T);
Expand description

Special struct which is way more eager at implementing From for a bunch of things, so that in the macros we can use TestHelper<Term>::from and try and convert things as often as possible.

Tuple Fields§

§0: T

Trait Implementations§

source§

impl From<&str> for TestHelper<Value>

source§

fn from(other: &str) -> Self

Converts to this type from the input type.
source§

impl From<(Symbol, Term)> for TestHelper<Parameter>

source§

fn from(arg: (Symbol, Term)) -> Self

Converts to this type from the input type.
source§

impl From<BTreeMap<Symbol, Term>> for TestHelper<Dictionary>

source§

fn from(other: BTreeMap<Symbol, Term>) -> Self

Converts to this type from the input type.
source§

impl From<BTreeMap<Symbol, Term>> for TestHelper<Pattern>

source§

fn from(other: BTreeMap<Symbol, Term>) -> Self

Converts to this type from the input type.
source§

impl From<BTreeMap<Symbol, Term>> for TestHelper<Value>

source§

fn from(other: BTreeMap<Symbol, Term>) -> Self

Converts to this type from the input type.
source§

impl From<Call> for TestHelper<Value>

source§

fn from(other: Call) -> Self

Converts to this type from the input type.
source§

impl From<Dictionary> for TestHelper<Pattern>

source§

fn from(other: Dictionary) -> Self

Converts to this type from the input type.
source§

impl From<InstanceLiteral> for TestHelper<Pattern>

source§

fn from(other: InstanceLiteral) -> Self

Converts to this type from the input type.
source§

impl From<InstanceLiteral> for TestHelper<Value>

source§

fn from(other: InstanceLiteral) -> Self

Converts to this type from the input type.
source§

impl From<Operation> for TestHelper<Value>

source§

fn from(other: Operation) -> Self

Converts to this type from the input type.
source§

impl From<Pattern> for TestHelper<Term>

source§

fn from(other: Pattern) -> Self

Converts to this type from the input type.
source§

impl From<Pattern> for TestHelper<Value>

source§

fn from(other: Pattern) -> Self

Converts to this type from the input type.
source§

impl<S: AsRef<str>> From<S> for TestHelper<Symbol>

source§

fn from(other: S) -> Self

Converts to this type from the input type.
source§

impl From<Symbol> for TestHelper<Value>

source§

fn from(other: Symbol) -> Self

Converts to this type from the input type.
source§

impl<T> From<T> for TestHelper<T>

source§

fn from(other: T) -> Self

Converts to this type from the input type.
source§

impl From<Value> for TestHelper<Parameter>

source§

fn from(name: Value) -> Self

Convert a Value to a parameter. If the value is a symbol, it is used as the parameter name. Otherwise it is assumed to be a specializer.

source§

impl From<Value> for TestHelper<Term>

source§

fn from(other: Value) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Term>> for TestHelper<Value>

source§

fn from(other: TermList) -> Self

Converts to this type from the input type.
source§

impl From<bool> for TestHelper<Value>

source§

fn from(other: bool) -> Self

Converts to this type from the input type.
source§

impl From<f64> for TestHelper<Value>

source§

fn from(other: f64) -> Self

Converts to this type from the input type.
source§

impl From<i64> for TestHelper<Value>

source§

fn from(other: i64) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for TestHelper<T>
where T: RefUnwindSafe,

§

impl<T> Send for TestHelper<T>
where T: Send,

§

impl<T> Sync for TestHelper<T>
where T: Sync,

§

impl<T> Unpin for TestHelper<T>
where T: Unpin,

§

impl<T> UnwindSafe for TestHelper<T>
where T: 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<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
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>,

§

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>,

§

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.