Decodable in rustc_serialize::serialize - Rust (original) (raw)
pub trait Decodable<D: Decoder>: Sized {
// Required method
fn decode(d: &mut D) -> Self;
}
Expand description
Trait for types that can be deserialized
This can be implemented using the Decodable, TyDecodable andMetadataDecodable macros.
Decodable should be used in crates that don’t depend onrustc_middle.
MetadataDecodable is used in rustc_metadata for types that containrustc_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§
Source
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Source§
Implementors§
Source§