JobEntity

Enum JobEntity 

Source
pub enum JobEntity {
    Owned(DecodedEntity),
    Cached(Arc<DecodedEntity>),
}
Expand description

No new allocation for native jobs; browser cache hits keep their Arc.

Variants§

Methods from Deref<Target = DecodedEntity>§

Source

pub fn get(&self, index: usize) -> Option<&AttributeValue>

Get attribute by index

Source

pub fn get_ref(&self, index: usize) -> Option<u32>

Get entity reference attribute

Source

pub fn get_string(&self, index: usize) -> Option<&str>

Get string attribute

Source

pub fn get_float(&self, index: usize) -> Option<f64>

Get float attribute

Source

pub fn get_list(&self, index: usize) -> Option<&[AttributeValue]>

Get list attribute

Source

pub fn get_refs(&self, index: usize) -> Option<Vec<u32>>

Get entity references from a list attribute. A bare reference is a tolerated one-element list, and an IfcPropertySetDefinitionSet typed parameter is its set (see AttributeValue::as_ref_members); non-reference list members are skipped.

Source

pub fn get_logical(&self, index: usize) -> Option<Logical>

Get a STEP LOGICAL attribute (see AttributeValue::as_logical).

Source

pub fn get_bool(&self, index: usize) -> Option<bool>

Get a definite boolean attribute: None for .U., $ and a missing or non-boolean value. get_bool(i).unwrap_or(default) is the one way to read a flag; the default is the caller’s policy.

Source

pub fn get_enum(&self, index: usize) -> Option<&str>

Get an enumeration attribute, seeing through a typed wrapper.

Source

pub fn get_int(&self, index: usize) -> Option<i64>

Get an integer attribute (see AttributeValue::as_int).

Source

pub fn attr(&self, slot: impl AnySlot) -> Option<&AttributeValue>

The raw value at a slot or computed position.

Source

pub fn ref_at(&self, slot: impl Into<SlotIx<Ref>>) -> Option<u32>

An entity reference ($ and wrong shapes read as None).

Source

pub fn ref_list_at(&self, slot: impl Into<SlotIx<RefList>>) -> Option<Vec<u32>>

Reference members of a list, with DecodedEntity::get_refs semantics: a bare reference is a one-element list, an IfcPropertySetDefinitionSet typed parameter is its set, non-reference members are skipped, and an empty result is None.

Source

pub fn real_at(&self, slot: impl Into<SlotIx<Real>>) -> Option<f64>

A REAL (an INTEGER widens, a typed wrapper such as IFCLENGTHMEASURE(2.) is seen through), as AttributeValue::as_float.

Source

pub fn int_at(&self, slot: impl Into<SlotIx<Int>>) -> Option<i64>

An INTEGER, as AttributeValue::as_int.

Source

pub fn string_at(&self, slot: impl Into<SlotIx<Text>>) -> Option<&str>

A STRING, its STEP escapes already decoded (as DecodedEntity::get_string).

Source

pub fn enum_at(&self, slot: impl Into<SlotIx<Enum>>) -> Option<&str>

An enumeration literal without its dots (.ELEMENT. reads ELEMENT).

Source

pub fn logical_at(&self, slot: impl Into<SlotIx<Logical>>) -> Option<bool>

A BOOLEAN or LOGICAL as a definite boolean, with DecodedEntity::get_bool semantics (one meaning, F3c): .T. is true, .F. is false, .U. (unknown), $ and anything else are None.

Source

pub fn binary_at(&self, slot: impl Into<SlotIx<Binary>>) -> Option<&str>

A BINARY literal’s raw content, undecoded (see crate::decode_step_binary).

Source

pub fn list_at( &self, slot: impl Into<SlotIx<List>>, ) -> Option<&[AttributeValue]>

An aggregate’s members.

Trait Implementations§

Source§

impl Deref for JobEntity

Source§

type Target = DecodedEntity

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

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
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. 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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more