pub trait Encodable<S: Encoder>: PointeeSized {
// Required method
fn encode(&self, s: &mut S);
}Expand description
Trait for types that can be serialized
This can be implemented using the Encodable, TyEncodable and
MetadataEncodable macros.
Encodableshould be used in crates that don’t depend onrustc_middle.MetadataEncodableis used inrustc_metadatafor types that containrustc_metadata::rmeta::Lazy.TyEncodableshould be used for types that are only serialized in crate metadata or the incremental cache. This is most types inrustc_middle.