pub enum Primitive {
String,
Integer,
Float,
Decimal,
Boolean,
Date,
DateTime,
MonthDay,
Time,
Duration,
Uri,
}Expand description
A CIM primitive type (IEC 61970-301).
Variants§
Implementations§
Source§impl Primitive
impl Primitive
Sourcepub const fn xsd_datatype(self) -> &'static str
pub const fn xsd_datatype(self) -> &'static str
The XML Schema datatype IRI this primitive’s values carry in RDF.
CIM/XML exchanges no datatype information — every value is element text — so this
mapping is the only thing that can supply one, and it has to agree with the shapes
a consumer will validate against. It is taken from ENTSO-E’s own published SHACL:
of the 3,137 sh:datatype constraints in the CGMES 3.0 shapes, 2,871 name
xsd:float, which is why CIM Float maps to xsd:float and not to the
xsd:double a 64-bit representation would suggest.
Primitive::String returns the empty string: RDF 1.1 gives a literal with no
datatype the type xsd:string already, so writing one would be redundant.
Trait Implementations§
impl Copy for Primitive
impl Eq for Primitive
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl Forget for Primitive
impl Freeze for Primitive
impl Move for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnsafeUnpin for Primitive
impl UnwindSafe for Primitive
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.