Trait UpcastFrom

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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,