Skip to main content

DowncastFrom

Trait DowncastFrom 

Source
pub trait DowncastFrom<T>
where T: Downcast<Self>, Self: Sized,
{ // Required method fn downcast_from(t: T) -> Result<Self, DowncastError> where Self: Sized; }
Expand description

This trait lets one downcast a generic type like Value to a specific type like u64.

It exists, rather than for example using TryInto, due to coherence issues with downcasting to foreign types like Option<T>.

Required Methods§

Source

fn downcast_from(t: T) -> Result<Self, DowncastError>
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl DowncastFrom<Group> for ()

Source§

impl DowncastFrom<Value> for ()

Source§

impl DowncastFrom<Value> for String

Source§

impl DowncastFrom<Value> for bool

Source§

impl DowncastFrom<Value> for f32

Source§

impl DowncastFrom<Value> for f64

Source§

impl DowncastFrom<Value> for i8

Source§

impl DowncastFrom<Value> for i16

Source§

impl DowncastFrom<Value> for i32

Source§

impl DowncastFrom<Value> for i64

Source§

impl DowncastFrom<Value> for u8

Source§

impl DowncastFrom<Value> for u16

Source§

impl DowncastFrom<Value> for u32

Source§

impl DowncastFrom<Value> for u64

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> DowncastFrom<Group> for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> DowncastFrom<Value> for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> DowncastFrom<Group> for (A, B, C, D, E, F, G, H, I, J, K)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> DowncastFrom<Value> for (A, B, C, D, E, F, G, H, I, J, K)

Source§

impl<A, B, C, D, E, F, G, H, I, J> DowncastFrom<Group> for (A, B, C, D, E, F, G, H, I, J)

Source§

impl<A, B, C, D, E, F, G, H, I, J> DowncastFrom<Value> for (A, B, C, D, E, F, G, H, I, J)

Source§

impl<A, B, C, D, E, F, G, H, I> DowncastFrom<Group> for (A, B, C, D, E, F, G, H, I)

Source§

impl<A, B, C, D, E, F, G, H, I> DowncastFrom<Value> for (A, B, C, D, E, F, G, H, I)

Source§

impl<A, B, C, D, E, F, G, H> DowncastFrom<Group> for (A, B, C, D, E, F, G, H)

Source§

impl<A, B, C, D, E, F, G, H> DowncastFrom<Value> for (A, B, C, D, E, F, G, H)

Source§

impl<A, B, C, D, E, F, G> DowncastFrom<Group> for (A, B, C, D, E, F, G)

Source§

impl<A, B, C, D, E, F, G> DowncastFrom<Value> for (A, B, C, D, E, F, G)

Source§

impl<A, B, C, D, E, F> DowncastFrom<Group> for (A, B, C, D, E, F)

Source§

impl<A, B, C, D, E, F> DowncastFrom<Value> for (A, B, C, D, E, F)

Source§

impl<A, B, C, D, E> DowncastFrom<Group> for (A, B, C, D, E)

Source§

impl<A, B, C, D, E> DowncastFrom<Value> for (A, B, C, D, E)

Source§

impl<A, B, C, D> DowncastFrom<Group> for (A, B, C, D)

Source§

impl<A, B, C, D> DowncastFrom<Value> for (A, B, C, D)

Source§

impl<A, B, C> DowncastFrom<Group> for (A, B, C)

Source§

impl<A, B, C> DowncastFrom<Value> for (A, B, C)

Source§

impl<A, B> DowncastFrom<A> for Box<B>
where B: DowncastFrom<A>,

Source§

fn downcast_from(t: A) -> Result<Self, DowncastError>
where Self: Sized,

Source§

impl<A, B> DowncastFrom<Group> for (A, B)

Source§

impl<A, B> DowncastFrom<Value> for (A, B)

Source§

impl<A> DowncastFrom<Group> for (A,)
where A: DowncastFrom<Value>,

Source§

impl<A> DowncastFrom<Value> for (A,)
where A: DowncastFrom<Value>,

Source§

impl<K, V, S> DowncastFrom<Value> for HashMap<K, V, S>

Source§

impl<T> DowncastFrom<Value> for Option<T>
where T: DowncastFrom<Value>,

Source§

impl<T> DowncastFrom<Value> for [T; 0]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 1]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 2]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 3]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 4]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 5]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 6]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 7]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 8]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 9]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 10]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 11]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 12]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 13]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 14]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 15]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 16]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 17]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 18]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 19]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 20]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 21]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 22]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 23]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 24]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 25]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 26]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 27]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 28]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 29]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 30]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 31]
where T: DowncastFrom<Value> + Data,

Source§

impl<T> DowncastFrom<Value> for [T; 32]
where T: DowncastFrom<Value> + Data,

Implementors§