pub trait UpcastFrom<T: Clone> {
    // Required method
    fn upcast_from(term: T) -> Self;
}
Expand description

Our version of From. One twist: it is implemented for &T for all T. This is the trait you implement.

Required Methods§

source

fn upcast_from(term: T) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl UpcastFrom<&str> for String

source§

fn upcast_from(term: &str) -> Self

source§

impl UpcastFrom<u32> for u32

source§

impl UpcastFrom<usize> for usize

source§

impl UpcastFrom<String> for String

source§

impl<A, As, B, Bs, Z> UpcastFrom<(A, B)> for Vec<Z>
where A: IntoIterator<Item = As> + Clone, As: Upcast<Z>, B: IntoIterator<Item = Bs> + Clone, Bs: Upcast<Z>,

source§

fn upcast_from(term: (A, B)) -> Self

source§

impl<A, B, A1, B1> UpcastFrom<(A1, B1)> for (A, B)
where A1: Upcast<A>, B1: Upcast<B>,

source§

fn upcast_from(term: (A1, B1)) -> Self

source§

impl<A, B, C, A1, B1, C1> UpcastFrom<(A1, B1, C1)> for (A, B, C)
where A1: Upcast<A>, B1: Upcast<B>, C1: Upcast<C>,

source§

impl<A, B, C, Z> UpcastFrom<(A, B, C)> for Vec<Z>
where A: Upcast<Z>, B: Upcast<Z>, C: Upcast<Z>,

source§

fn upcast_from(term: (A, B, C)) -> Self

source§

impl<T, U> UpcastFrom<&[T]> for Vec<U>
where T: Upcast<U> + Clone,

source§

fn upcast_from(term: &[T]) -> Self

source§

impl<T, U> UpcastFrom<Option<T>> for Option<U>
where T: Upcast<U> + Clone,

source§

fn upcast_from(term: Option<T>) -> Self

source§

impl<T, U> UpcastFrom<Arc<T>> for Arc<U>
where T: Upcast<U> + Clone,

source§

fn upcast_from(term: Arc<T>) -> Self

source§

impl<T, U> UpcastFrom<Vec<T>> for Vec<U>
where T: Upcast<U> + Clone,

source§

fn upcast_from(term: Vec<T>) -> Self

Implementors§

source§

impl<A, B, C, D, T> UpcastFrom<(A, B, C, D)> for Set<T>
where A: Upcast<Set<T>>, B: Upcast<Set<T>>, C: Upcast<Set<T>>, D: Upcast<Set<T>>, T: Ord + Clone,

source§

impl<A, B, C, T> UpcastFrom<(A, B, C)> for Set<T>
where A: Upcast<Set<T>>, B: Upcast<Set<T>>, C: Upcast<Set<T>>, T: Ord + Clone,

source§

impl<A, B, T> UpcastFrom<(A, B)> for Set<T>
where A: Upcast<Set<T>>, B: Upcast<Set<T>>, T: Ord + Clone,

source§

impl<L: Language> UpcastFrom<CoreVariable<L>> for CoreVariable<L>

source§

impl<L: Language> UpcastFrom<CoreBoundVar<L>> for CoreVariable<L>

source§

impl<L: Language> UpcastFrom<CoreBoundVar<L>> for CoreBoundVar<L>

source§

impl<L: Language> UpcastFrom<CoreExistentialVar<L>> for CoreVariable<L>

source§

impl<L: Language> UpcastFrom<CoreExistentialVar<L>> for CoreExistentialVar<L>

source§

impl<L: Language> UpcastFrom<CoreUniversalVar<L>> for CoreVariable<L>

source§

impl<L: Language> UpcastFrom<CoreUniversalVar<L>> for CoreUniversalVar<L>

source§

impl<L: Language, A, B> UpcastFrom<(A, B)> for CoreSubstitution<L>
where A: Upcast<CoreVariable<L>>, B: Upcast<CoreParameter<L>>,

source§

impl<L: Language, T, U> UpcastFrom<CoreBinder<L, T>> for CoreBinder<L, U>
where T: Clone + Upcast<U>, U: Clone,

source§

impl<T> UpcastFrom<()> for T
where T: Default,

source§

impl<T, U> UpcastFrom<&T> for U
where T: Upcast<U> + Clone,

source§

impl<T, U> UpcastFrom<BTreeSet<T>> for Set<U>
where T: Upcast<U> + Ord + Clone, U: Ord,