pub trait Read<I: Identifier>: Context {
type Buffer: Buffer;
// Required method
fn read(&self, ident: I) -> Option<Self::Buffer>;
// Provided methods
fn read_spec(&self, ident: I) -> Option<Spec<Self::Buffer>> { ... }
fn read_shape(&self, ident: I) -> Option<ShapeOf<Self::Buffer>> { ... }
}Expand description
Trait for reading entries out of a Context.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn read_spec(&self, ident: I) -> Option<Spec<Self::Buffer>>
fn read_spec(&self, ident: I) -> Option<Spec<Self::Buffer>>
Returns a specification of the value associated with ident, if it exists.
Sourcefn read_shape(&self, ident: I) -> Option<ShapeOf<Self::Buffer>>
fn read_shape(&self, ident: I) -> Option<ShapeOf<Self::Buffer>>
Returns the shape of the value associated with ident, if it exists.
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.