Skip to main content

Schema

Struct Schema 

Source
pub struct Schema {
    pub classes: &'static [ClassDef],
    pub profiles: &'static [(&'static str, &'static str)],
    pub namespaces: &'static [(&'static str, &'static str)],
    pub enums: &'static [EnumDef],
}
Expand description

What one family’s schema says, as a table: its classes, the profiles it defines and the namespaces its vocabularies bind. Generated by cimgen, or read from RDFS at runtime (schema_source).

Fields§

§classes: &'static [ClassDef]§profiles: &'static [(&'static str, &'static str)]

Profile code → profile URI, the value a dataset’s header declares; sorted by code.

§namespaces: &'static [(&'static str, &'static str)]

XML prefix → namespace IRI; sorted by prefix.

§enums: &'static [EnumDef]

Enumerations, sorted by name.

Implementations§

Source§

impl Schema

Source

pub fn enumeration(&self, name: &str) -> Option<&'static EnumDef>

The enumeration called name (WindingConnection).

Source

pub fn enum_value( &self, id: &str, ) -> Option<(&'static EnumDef, &'static EnumValueDef)>

The enumeration value id names, as the decoder keeps it (WindingConnection.D), with its enumeration.

Trait Implementations§

Source§

impl Debug for Schema

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for Schema

§

impl Freeze for Schema

§

impl Move for Schema

§

impl RefUnwindSafe for Schema

§

impl Send for Schema

§

impl Sync for Schema

§

impl Unpin for Schema

§

impl UnsafeUnpin for Schema

§

impl UnwindSafe for Schema

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.