pub enum Attribute {
Integer(i64),
Real(f64),
String(String),
Enum(String),
Binary(String),
EntityRef(u64),
Unset,
Derived,
List(Vec<Attribute>),
Typed {
type_name: String,
value: Box<Attribute>,
},
}Expand description
A parsed attribute value from a Part 21 entity instance.
Covers every construct allowed in a parameter position by ISO 10303-21.
Variants§
Integer(i64)
Real(f64)
String(String)
String with outer quotes stripped. The '' escape is decoded to a
single ' by the lexer. Wide-char escapes (\X\HH, \X2\...\X0\)
are not decoded — that step is deferred to a later stage.
Enum(String)
Enumeration value without the surrounding dots (e.g. .T. → "T").
Binary(String)
Hex-encoded binary without the surrounding quotes.
EntityRef(u64)
Entity reference #N.
Unset
Unset / omitted attribute ($).
Derived
Derived attribute (*).
List(Vec<Attribute>)
Parenthesised list of parameters. May be nested.
Typed
Typed parameter such as LENGTH_MEASURE(1.E-07).
Trait Implementations§
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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