pub trait Schema {
type Mapping: Sized;
// Required methods
fn name(&self) -> &str;
fn interface_name(&self) -> &InterfaceName;
fn version_major(&self) -> i32;
fn version_minor(&self) -> i32;
fn version(&self) -> InterfaceVersion;
fn interface_type(&self) -> InterfaceType;
fn ownership(&self) -> Ownership;
fn aggregation(&self) -> Aggregation;
fn iter_mappings(&self) -> impl Iterator<Item = &Self::Mapping>;
fn mappings_len(&self) -> usize;
fn iter_interface_mappings(
&self,
) -> impl Iterator<Item = Mapping<Cow<'_, str>>>;
}Expand description
Access to the information of an interface.
Required Associated Types§
Required Methods§
Sourcefn interface_name(&self) -> &InterfaceName
fn interface_name(&self) -> &InterfaceName
Returns the interface name.
Sourcefn version_major(&self) -> i32
fn version_major(&self) -> i32
Returns the interface major version.
Sourcefn version_minor(&self) -> i32
fn version_minor(&self) -> i32
Returns the interface minor version.
Sourcefn version(&self) -> InterfaceVersion
fn version(&self) -> InterfaceVersion
Returns the interface version.
Sourcefn interface_type(&self) -> InterfaceType
fn interface_type(&self) -> InterfaceType
Returns the interface type.
Sourcefn aggregation(&self) -> Aggregation
fn aggregation(&self) -> Aggregation
Returns the interface aggregation.
Sourcefn iter_mappings(&self) -> impl Iterator<Item = &Self::Mapping>
fn iter_mappings(&self) -> impl Iterator<Item = &Self::Mapping>
Returns an iterator over the interface’s mappings.
Sourcefn mappings_len(&self) -> usize
fn mappings_len(&self) -> usize
Returns the number of Mappings in the interface.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".