pub trait Fields {
// Required methods
fn name(&self, index: usize) -> Option<&str>;
fn get(&self, name: &str) -> Option<Shown<'_>>;
// Provided method
fn names(&self) -> Box<dyn Iterator<Item = &str> + '_> { ... }
}Expand description
Named and ordered as the type’s JSON; #[derive(ReadModel)] writes them for a read model.
Required Methods§
fn name(&self, index: usize) -> Option<&str>
fn get(&self, name: &str) -> Option<Shown<'_>>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".