Skip to main content

ClassDef

Struct ClassDef 

Source
pub struct ClassDef {
Show 14 fields pub name: &'static str, pub ns: NsId, pub parent: Option<ClassId>, pub concrete: bool, pub profiles: ProfileMask, pub defined_in: ProfileMask, pub concrete_in: ProfileMask, pub deprecated: bool, pub compound: bool, pub own_attrs: &'static [AttrId], pub all_attrs: &'static [AttrId], pub ancestors: &'static [ClassId], pub descendants: &'static [ClassId], pub doc: &'static str,
}

Fields§

§name: &'static str

Local name, e.g. ACLineSegment.

§ns: NsId§parent: Option<ClassId>

Direct superclass, if any.

§concrete: bool

Whether instances of this class may appear in an instance document.

§profiles: ProfileMask

Profiles whose vocabulary declares this class.

This is declaration, not reach: an instance may still carry another profile’s data through an inherited attribute — a Steady State Hypothesis file sets Equipment.inService on a BusbarSection that only the Equipment profile declares. Use an object’s stored values to decide what a profile export contains.

§defined_in: ProfileMask

Profiles whose vocabulary defines this class rather than only referring to it.

IEC 61970-552 distinguishes the file that introduces an object (rdf:ID) from a file that adds to an object defined elsewhere (rdf:about), and the RDFS records which is which by marking the latter with cims:stereotype Description. Steady State Hypothesis marks every class it touches; State Variables marks only CsConverter and VsConverter, which is why published SV files identify SvPowerFlow with rdf:ID. IdStyle::Auto reads this field.

§concrete_in: ProfileMask

Profiles that declare this class concrete, i.e. may hold instances of it.

Narrower than ClassDef::defined_in, and deliberately so. defined_in answers “did this file introduce the object”, which decides rdf:ID versus rdf:about and must tolerate published files that instantiate a class their own profile declares abstract. concrete_in answers “may this profile hold such an instance at all”, which is what tells validation whether the file that would carry an object’s mandatory attributes is loaded.

§deprecated: bool§compound: bool

Whether this class is a compound value type without identity.

Compounds are written inline inside the property that holds them and never carry an rdf:ID, so they cannot appear as top-level objects.

§own_attrs: &'static [AttrId]

Attributes declared directly on this class.

§all_attrs: &'static [AttrId]

Every attribute visible on this class, inherited ones first (root-first order).

§ancestors: &'static [ClassId]

Transitive superclasses, nearest parent first.

§descendants: &'static [ClassId]

This class and every class inheriting from it, in schema order.

§doc: &'static str

Trait Implementations§

Source§

impl Debug for ClassDef

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for ClassDef

§

impl Freeze for ClassDef
where &'static str: Freeze, &'static [AttrId]: Freeze, &'static [ClassId]: Freeze,

§

impl Move for ClassDef

§

impl RefUnwindSafe for ClassDef

§

impl Send for ClassDef
where &'static str: Send, &'static [AttrId]: Send, &'static [ClassId]: Send,

§

impl Sync for ClassDef

§

impl Unpin for ClassDef
where &'static str: Unpin, &'static [AttrId]: Unpin, &'static [ClassId]: Unpin,

§

impl UnsafeUnpin for ClassDef
where &'static str: UnsafeUnpin, &'static [AttrId]: UnsafeUnpin, &'static [ClassId]: UnsafeUnpin,

§

impl UnwindSafe for ClassDef
where &'static str: UnwindSafe, &'static [AttrId]: UnwindSafe, &'static [ClassId]: UnwindSafe,

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, 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.