[][src]Trait rustc_ap_rustc_serialize::Decodable

pub trait Decodable<D: Decoder>: Sized {
    fn decode(d: &mut D) -> Result<Self, D::Error>;
}

Trait for types that can be deserialized

This can be implemented using the Decodable, TyDecodable and MetadataDecodable macros.

  • Decodable should be used in crates that don't depend on rustc_middle.
  • MetadataDecodable is used in rustc_metadata for types that contain rustc_metadata::rmeta::Lazy.
  • TyDecodable should be used for types that are only serialized in crate metadata or the incremental cache. This is most types in rustc_middle.

Required methods

fn decode(d: &mut D) -> Result<Self, D::Error>

Loading content...

Implementations on Foreign Types

impl<D: Decoder, A: Array<Item: Decodable<D>>> Decodable<D> for SmallVec<A>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for LinkedList<T>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for VecDeque<T>[src]

impl<D: Decoder, K, V> Decodable<D> for BTreeMap<K, V> where
    K: Decodable<D> + PartialEq + Ord,
    V: Decodable<D>, 
[src]

impl<D: Decoder, T> Decodable<D> for BTreeSet<T> where
    T: Decodable<D> + PartialEq + Ord
[src]

impl<D: Decoder, K, V, S> Decodable<D> for HashMap<K, V, S> where
    K: Decodable<D> + Hash + Eq,
    V: Decodable<D>,
    S: BuildHasher + Default
[src]

impl<D: Decoder, T, S> Decodable<D> for HashSet<T, S> where
    T: Decodable<D> + Hash + Eq,
    S: BuildHasher + Default
[src]

impl<D: Decoder, K, V, S> Decodable<D> for IndexMap<K, V, S> where
    K: Decodable<D> + Hash + Eq,
    V: Decodable<D>,
    S: BuildHasher + Default
[src]

impl<D: Decoder, T, S> Decodable<D> for IndexSet<T, S> where
    T: Decodable<D> + Hash + Eq,
    S: BuildHasher + Default
[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for Rc<[T]>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for Arc<[T]>[src]

impl<D: Decoder> Decodable<D> for usize[src]

impl<D: Decoder> Decodable<D> for u8[src]

impl<D: Decoder> Decodable<D> for u16[src]

impl<D: Decoder> Decodable<D> for u32[src]

impl<D: Decoder> Decodable<D> for u64[src]

impl<D: Decoder> Decodable<D> for u128[src]

impl<D: Decoder> Decodable<D> for isize[src]

impl<D: Decoder> Decodable<D> for i8[src]

impl<D: Decoder> Decodable<D> for i16[src]

impl<D: Decoder> Decodable<D> for i32[src]

impl<D: Decoder> Decodable<D> for i64[src]

impl<D: Decoder> Decodable<D> for i128[src]

impl<D: Decoder> Decodable<D> for f32[src]

impl<D: Decoder> Decodable<D> for f64[src]

impl<D: Decoder> Decodable<D> for bool[src]

impl<D: Decoder> Decodable<D> for char[src]

impl<D: Decoder> Decodable<D> for NonZeroU32[src]

impl<D: Decoder> Decodable<D> for String[src]

impl<D: Decoder> Decodable<D> for ()[src]

impl<D: Decoder, T> Decodable<D> for PhantomData<T>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for Box<[T]>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for Rc<T>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for Vec<T>[src]

impl<D: Decoder> Decodable<D> for [u8; 20][src]

impl<D: Decoder, T: Decodable<D> + ToOwned> Decodable<D> for Cow<'static, [T]> where
    [T]: ToOwned<Owned = Vec<T>>, 
[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for Option<T>[src]

impl<D: Decoder, T1: Decodable<D>, T2: Decodable<D>> Decodable<D> for Result<T1, T2>[src]

impl<D: Decoder, T0: Decodable<D>, T1: Decodable<D>, T2: Decodable<D>, T3: Decodable<D>, T4: Decodable<D>, T5: Decodable<D>, T6: Decodable<D>, T7: Decodable<D>, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<D: Decoder, T1: Decodable<D>, T2: Decodable<D>, T3: Decodable<D>, T4: Decodable<D>, T5: Decodable<D>, T6: Decodable<D>, T7: Decodable<D>, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<D: Decoder, T2: Decodable<D>, T3: Decodable<D>, T4: Decodable<D>, T5: Decodable<D>, T6: Decodable<D>, T7: Decodable<D>, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<D: Decoder, T3: Decodable<D>, T4: Decodable<D>, T5: Decodable<D>, T6: Decodable<D>, T7: Decodable<D>, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<D: Decoder, T4: Decodable<D>, T5: Decodable<D>, T6: Decodable<D>, T7: Decodable<D>, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<D: Decoder, T5: Decodable<D>, T6: Decodable<D>, T7: Decodable<D>, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T5, T6, T7, T8, T9, T10, T11)[src]

impl<D: Decoder, T6: Decodable<D>, T7: Decodable<D>, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T6, T7, T8, T9, T10, T11)[src]

impl<D: Decoder, T7: Decodable<D>, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T7, T8, T9, T10, T11)[src]

impl<D: Decoder, T8: Decodable<D>, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T8, T9, T10, T11)[src]

impl<D: Decoder, T9: Decodable<D>, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T9, T10, T11)[src]

impl<D: Decoder, T10: Decodable<D>, T11: Decodable<D>> Decodable<D> for (T10, T11)[src]

impl<D: Decoder, T11: Decodable<D>> Decodable<D> for (T11,)[src]

impl<D: Decoder> Decodable<D> for PathBuf[src]

impl<D: Decoder, T: Decodable<D> + Copy> Decodable<D> for Cell<T>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for RefCell<T>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for Arc<T>[src]

impl<D: Decoder, T: Decodable<D>> Decodable<D> for Box<T>[src]

Loading content...

Implementors

Loading content...