Skip to main content

Schema

Trait Schema 

Source
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§

Source

type Mapping: Sized

Mapping specific for the interface type and aggregation.

Required Methods§

Source

fn name(&self) -> &str

Returns the interface name.

Source

fn interface_name(&self) -> &InterfaceName

Returns the interface name.

Source

fn version_major(&self) -> i32

Returns the interface major version.

Source

fn version_minor(&self) -> i32

Returns the interface minor version.

Source

fn version(&self) -> InterfaceVersion

Returns the interface version.

Source

fn interface_type(&self) -> InterfaceType

Returns the interface type.

Source

fn ownership(&self) -> Ownership

Returns the interface ownership.

Source

fn aggregation(&self) -> Aggregation

Returns the interface aggregation.

Source

fn iter_mappings(&self) -> impl Iterator<Item = &Self::Mapping>

Returns an iterator over the interface’s mappings.

Source

fn mappings_len(&self) -> usize

Returns the number of Mappings in the interface.

Source

fn iter_interface_mappings(&self) -> impl Iterator<Item = Mapping<Cow<'_, str>>>

Returns an iterator over the interface’s mappings.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§