[][src]Trait rustc_ap_rustc_serialize::Encodable

pub trait Encodable<S: Encoder> {
    fn encode(&self, s: &mut S) -> Result<(), S::Error>;
}

Trait for types that can be serialized

This can be implemented using the Encodable, TyEncodable and MetadataEncodable macros.

  • Encodable should be used in crates that don't depend on rustc_middle.
  • MetadataEncodable is used in rustc_metadata for types that contain rustc_metadata::rmeta::Lazy.
  • TyEncodable 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 encode(&self, s: &mut S) -> Result<(), S::Error>

Loading content...

Implementations on Foreign Types

impl<S: Encoder, A: Array<Item: Encodable<S>>> Encodable<S> for SmallVec<A>[src]

impl<S: Encoder, T: Encodable<S>> Encodable<S> for LinkedList<T>[src]

impl<S: Encoder, T: Encodable<S>> Encodable<S> for VecDeque<T>[src]

impl<S: Encoder, K, V> Encodable<S> for BTreeMap<K, V> where
    K: Encodable<S> + PartialEq + Ord,
    V: Encodable<S>, 
[src]

impl<S: Encoder, T> Encodable<S> for BTreeSet<T> where
    T: Encodable<S> + PartialEq + Ord
[src]

impl<E: Encoder, K, V, S> Encodable<E> for HashMap<K, V, S> where
    K: Encodable<E> + Eq,
    V: Encodable<E>,
    S: BuildHasher
[src]

impl<E: Encoder, T, S> Encodable<E> for HashSet<T, S> where
    T: Encodable<E> + Eq,
    S: BuildHasher
[src]

impl<E: Encoder, T, S, '_> Encodable<E> for &'_ HashSet<T, S> where
    T: Encodable<E> + Eq,
    S: BuildHasher
[src]

impl<E: Encoder, K, V, S> Encodable<E> for IndexMap<K, V, S> where
    K: Encodable<E> + Hash + Eq,
    V: Encodable<E>,
    S: BuildHasher
[src]

impl<E: Encoder, T, S> Encodable<E> for IndexSet<T, S> where
    T: Encodable<E> + Hash + Eq,
    S: BuildHasher
[src]

impl<E: Encoder, T: Encodable<E>> Encodable<E> for Rc<[T]>[src]

impl<E: Encoder, T: Encodable<E>> Encodable<E> for Arc<[T]>[src]

impl<S: Encoder> Encodable<S> for usize[src]

impl<S: Encoder> Encodable<S> for u8[src]

impl<S: Encoder> Encodable<S> for u16[src]

impl<S: Encoder> Encodable<S> for u32[src]

impl<S: Encoder> Encodable<S> for u64[src]

impl<S: Encoder> Encodable<S> for u128[src]

impl<S: Encoder> Encodable<S> for isize[src]

impl<S: Encoder> Encodable<S> for i8[src]

impl<S: Encoder> Encodable<S> for i16[src]

impl<S: Encoder> Encodable<S> for i32[src]

impl<S: Encoder> Encodable<S> for i64[src]

impl<S: Encoder> Encodable<S> for i128[src]

impl<S: Encoder> Encodable<S> for f32[src]

impl<S: Encoder> Encodable<S> for f64[src]

impl<S: Encoder> Encodable<S> for bool[src]

impl<S: Encoder> Encodable<S> for char[src]

impl<S: Encoder> Encodable<S> for NonZeroU32[src]

impl<S: Encoder> Encodable<S> for str[src]

impl<S: Encoder, '_> Encodable<S> for &'_ str[src]

impl<S: Encoder> Encodable<S> for String[src]

impl<S: Encoder> Encodable<S> for ()[src]

impl<S: Encoder, T> Encodable<S> for PhantomData<T>[src]

impl<S: Encoder, T: Encodable<S>> Encodable<S> for Rc<T>[src]

impl<S: Encoder, T: Encodable<S>> Encodable<S> for [T][src]

impl<S: Encoder, T: Encodable<S>> Encodable<S> for Vec<T>[src]

impl<S: Encoder> Encodable<S> for [u8; 20][src]

impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]> where
    [T]: ToOwned<Owned = Vec<T>>, 
[src]

impl<S: Encoder, T: Encodable<S>> Encodable<S> for Option<T>[src]

impl<S: Encoder, T1: Encodable<S>, T2: Encodable<S>> Encodable<S> for Result<T1, T2>[src]

impl<S: Encoder, T0: Encodable<S>, T1: Encodable<S>, T2: Encodable<S>, T3: Encodable<S>, T4: Encodable<S>, T5: Encodable<S>, T6: Encodable<S>, T7: Encodable<S>, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<S: Encoder, T1: Encodable<S>, T2: Encodable<S>, T3: Encodable<S>, T4: Encodable<S>, T5: Encodable<S>, T6: Encodable<S>, T7: Encodable<S>, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<S: Encoder, T2: Encodable<S>, T3: Encodable<S>, T4: Encodable<S>, T5: Encodable<S>, T6: Encodable<S>, T7: Encodable<S>, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<S: Encoder, T3: Encodable<S>, T4: Encodable<S>, T5: Encodable<S>, T6: Encodable<S>, T7: Encodable<S>, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T3, T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<S: Encoder, T4: Encodable<S>, T5: Encodable<S>, T6: Encodable<S>, T7: Encodable<S>, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T4, T5, T6, T7, T8, T9, T10, T11)[src]

impl<S: Encoder, T5: Encodable<S>, T6: Encodable<S>, T7: Encodable<S>, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T5, T6, T7, T8, T9, T10, T11)[src]

impl<S: Encoder, T6: Encodable<S>, T7: Encodable<S>, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T6, T7, T8, T9, T10, T11)[src]

impl<S: Encoder, T7: Encodable<S>, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T7, T8, T9, T10, T11)[src]

impl<S: Encoder, T8: Encodable<S>, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T8, T9, T10, T11)[src]

impl<S: Encoder, T9: Encodable<S>, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T9, T10, T11)[src]

impl<S: Encoder, T10: Encodable<S>, T11: Encodable<S>> Encodable<S> for (T10, T11)[src]

impl<S: Encoder, T11: Encodable<S>> Encodable<S> for (T11,)[src]

impl<S: Encoder> Encodable<S> for Path[src]

impl<S: Encoder> Encodable<S> for PathBuf[src]

impl<S: Encoder, T: Encodable<S> + Copy> Encodable<S> for Cell<T>[src]

impl<S: Encoder, T: Encodable<S>> Encodable<S> for RefCell<T>[src]

impl<S: Encoder, T: Encodable<S>> Encodable<S> for Arc<T>[src]

impl<S: Encoder, T: ?Sized + Encodable<S>> Encodable<S> for Box<T>[src]

Loading content...

Implementors

impl<E: Encoder> Encodable<E> for Json[src]

Loading content...