Skip to main content

PropertyValue

Enum PropertyValue 

Source
pub enum PropertyValue {
    Single {
        value: Option<MeasureValue>,
        unit: Option<EntityId>,
    },
    Enumerated {
        values: Vec<MeasureValue>,
        enumeration: Option<EntityId>,
    },
    Bounded {
        upper: Option<MeasureValue>,
        lower: Option<MeasureValue>,
        set_point: Option<MeasureValue>,
        unit: Option<EntityId>,
    },
    List {
        values: Vec<MeasureValue>,
        unit: Option<EntityId>,
    },
    Table {
        defining: Vec<MeasureValue>,
        defined: Vec<MeasureValue>,
        interpolation: Option<Arc<str>>,
    },
    Reference {
        usage: Option<Arc<str>>,
        reference: Option<EntityId>,
    },
    Complex {
        usage: Option<Arc<str>>,
        properties: Vec<Property>,
    },
    Unsupported {
        type_name: Arc<str>,
    },
}
Expand description

What a property actually states.

One variant per concrete IfcProperty subtype in IFC4. A file stating a subtype this crate does not model yields PropertyValue::Unsupported carrying the type name, so an unknown property is reported rather than silently dropped from its set.

Variants§

§

Single

IfcPropertySingleValue: one measure, optionally with a unit.

Fields

§value: Option<MeasureValue>

The nominal value. None when the file omits it, which is legal.

§unit: Option<EntityId>

IfcNamedUnit/IfcDerivedUnit override for this property.

§

Enumerated

IfcPropertyEnumeratedValue: chosen constants plus their enumeration.

Fields

§values: Vec<MeasureValue>

The selected values.

§enumeration: Option<EntityId>

The IfcPropertyEnumeration they were selected from.

§

Bounded

IfcPropertyBoundedValue: a range, optionally with a set point.

Fields

§upper: Option<MeasureValue>

Slot 2. Named explicitly because the schema order is upper-first.

§lower: Option<MeasureValue>

Slot 3.

§set_point: Option<MeasureValue>

Slot 5.

§unit: Option<EntityId>

Slot 4.

§

List

IfcPropertyListValue: an ordered list of measures.

Fields

§values: Vec<MeasureValue>

The values, in file order. Order is meaningful in a LIST.

§unit: Option<EntityId>

Unit shared by every entry.

§

Table

IfcPropertyTableValue: a defining/defined value mapping.

Fields

§defining: Vec<MeasureValue>

The x column.

§defined: Vec<MeasureValue>

The y column.

§interpolation: Option<Arc<str>>

How to interpolate between rows, when stated.

§

Reference

IfcPropertyReferenceValue: a pointer to another entity.

Fields

§usage: Option<Arc<str>>

What the reference is for.

§reference: Option<EntityId>

The referenced entity.

§

Complex

IfcComplexProperty: nested properties under a usage name.

Fields

§usage: Option<Arc<str>>

The grouping name.

§properties: Vec<Property>

Contained properties, in file order.

§

Unsupported

A concrete IfcProperty subtype this crate does not model.

Fields

§type_name: Arc<str>

The declared type, upper-cased.

Trait Implementations§

Source§

impl Clone for PropertyValue

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PropertyValue

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PropertyValue

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PropertyValue

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.