pub struct DecodedEntity {
pub id: u32,
pub ifc_type: IfcType,
pub attributes: Arc<Vec<AttributeValue>>,
}Expand description
Decoded IFC entity. attributes is behind an Arc so cloning a
DecodedEntity (the decoder clones on every cache insert AND every cache
hit) is a refcount bump, not a deep clone of the attribute tree. Attributes
are never mutated after construction, so sharing is sound and byte-identical.
Fields§
§id: u32§ifc_type: IfcType§attributes: Arc<Vec<AttributeValue>>Implementations§
Source§impl DecodedEntity
impl DecodedEntity
Sourcepub fn new(id: u32, ifc_type: IfcType, attributes: Vec<AttributeValue>) -> Self
pub fn new(id: u32, ifc_type: IfcType, attributes: Vec<AttributeValue>) -> Self
Create new decoded entity
Sourcepub fn get(&self, index: usize) -> Option<&AttributeValue>
pub fn get(&self, index: usize) -> Option<&AttributeValue>
Get attribute by index
Sourcepub fn get_string(&self, index: usize) -> Option<&str>
pub fn get_string(&self, index: usize) -> Option<&str>
Get string attribute
Sourcepub fn get_list(&self, index: usize) -> Option<&[AttributeValue]>
pub fn get_list(&self, index: usize) -> Option<&[AttributeValue]>
Get list attribute
Trait Implementations§
Source§impl Clone for DecodedEntity
impl Clone for DecodedEntity
Source§fn clone(&self) -> DecodedEntity
fn clone(&self) -> DecodedEntity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DecodedEntity
impl RefUnwindSafe for DecodedEntity
impl Send for DecodedEntity
impl Sync for DecodedEntity
impl Unpin for DecodedEntity
impl UnsafeUnpin for DecodedEntity
impl UnwindSafe for DecodedEntity
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