[][src]Trait amadeus_types::DowncastFrom

pub trait DowncastFrom<T> where
    T: Downcast<Self>,
    Self: Sized
{ fn downcast_from(t: T) -> Result<Self, DowncastError>
    where
        Self: Sized
; }

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

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

Loading content...

Implementations on Foreign Types

impl DowncastFrom<Group> for ()[src]

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

impl<A, B> DowncastFrom<Group> for (A, B) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>, 
[src]

impl<A, B, C> DowncastFrom<Group> for (A, B, C) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>, 
[src]

impl<A, B, C, D> DowncastFrom<Group> for (A, B, C, D) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E> DowncastFrom<Group> for (A, B, C, D, E) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F> DowncastFrom<Group> for (A, B, C, D, E, F) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F, G> DowncastFrom<Group> for (A, B, C, D, E, F, G) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F, G, H> DowncastFrom<Group> for (A, B, C, D, E, F, G, H) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F, G, H, I> DowncastFrom<Group> for (A, B, C, D, E, F, G, H, I) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>,
    I: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F, G, H, I, J> DowncastFrom<Group> for (A, B, C, D, E, F, G, H, I, J) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>,
    I: DowncastFrom<Value>,
    J: DowncastFrom<Value>, 
[src]

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) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>,
    I: DowncastFrom<Value>,
    J: DowncastFrom<Value>,
    K: DowncastFrom<Value>, 
[src]

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) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>,
    I: DowncastFrom<Value>,
    J: DowncastFrom<Value>,
    K: DowncastFrom<Value>,
    L: DowncastFrom<Value>, 
[src]

impl DowncastFrom<Value> for bool[src]

impl DowncastFrom<Value> for u8[src]

impl DowncastFrom<Value> for i8[src]

impl DowncastFrom<Value> for u16[src]

impl DowncastFrom<Value> for i16[src]

impl DowncastFrom<Value> for u32[src]

impl DowncastFrom<Value> for i32[src]

impl DowncastFrom<Value> for u64[src]

impl DowncastFrom<Value> for i64[src]

impl DowncastFrom<Value> for f32[src]

impl DowncastFrom<Value> for f64[src]

impl DowncastFrom<Value> for String[src]

impl<K, V, S> DowncastFrom<Value> for HashMap<K, V, S> where
    K: DowncastFrom<Value> + Hash + Eq,
    V: DowncastFrom<Value>,
    S: BuildHasher + Default
[src]

impl<T> DowncastFrom<Value> for Option<T> where
    T: DowncastFrom<Value>, 
[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl DowncastFrom<Value> for ()[src]

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

impl<A, B> DowncastFrom<Value> for (A, B) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>, 
[src]

impl<A, B, C> DowncastFrom<Value> for (A, B, C) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>, 
[src]

impl<A, B, C, D> DowncastFrom<Value> for (A, B, C, D) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E> DowncastFrom<Value> for (A, B, C, D, E) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F> DowncastFrom<Value> for (A, B, C, D, E, F) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F, G> DowncastFrom<Value> for (A, B, C, D, E, F, G) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F, G, H> DowncastFrom<Value> for (A, B, C, D, E, F, G, H) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F, G, H, I> DowncastFrom<Value> for (A, B, C, D, E, F, G, H, I) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>,
    I: DowncastFrom<Value>, 
[src]

impl<A, B, C, D, E, F, G, H, I, J> DowncastFrom<Value> for (A, B, C, D, E, F, G, H, I, J) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>,
    I: DowncastFrom<Value>,
    J: DowncastFrom<Value>, 
[src]

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) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>,
    I: DowncastFrom<Value>,
    J: DowncastFrom<Value>,
    K: DowncastFrom<Value>, 
[src]

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) where
    A: DowncastFrom<Value>,
    B: DowncastFrom<Value>,
    C: DowncastFrom<Value>,
    D: DowncastFrom<Value>,
    E: DowncastFrom<Value>,
    F: DowncastFrom<Value>,
    G: DowncastFrom<Value>,
    H: DowncastFrom<Value>,
    I: DowncastFrom<Value>,
    J: DowncastFrom<Value>,
    K: DowncastFrom<Value>,
    L: DowncastFrom<Value>, 
[src]

impl<A, B> DowncastFrom<A> for Box<B> where
    B: DowncastFrom<A>, 
[src]

Loading content...

Implementors

impl DowncastFrom<Value> for Decimal[src]

impl DowncastFrom<Value> for IpAddr[src]

impl DowncastFrom<Value> for Value[src]

impl DowncastFrom<Value> for Bson[src]

impl DowncastFrom<Value> for Date[src]

impl DowncastFrom<Value> for DateTime[src]

impl DowncastFrom<Value> for DateTimeWithoutTimezone[src]

impl DowncastFrom<Value> for DateWithoutTimezone[src]

impl DowncastFrom<Value> for Enum[src]

impl DowncastFrom<Value> for Group[src]

impl DowncastFrom<Value> for Json[src]

impl DowncastFrom<Value> for Time[src]

impl DowncastFrom<Value> for TimeWithoutTimezone[src]

impl DowncastFrom<Value> for Timezone[src]

impl DowncastFrom<Value> for Url[src]

impl DowncastFrom<Value> for Webpage<'static>[src]

impl<T: Data> DowncastFrom<Value> for List<T> where
    T: DowncastFrom<Value>, 
[src]

Loading content...