Trait rustc_serialize::serialize::Encodable[][src]

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

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

Implementations on Foreign Types