pub enum JobEntity {
Owned(DecodedEntity),
Cached(Arc<DecodedEntity>),
}Expand description
No new allocation for native jobs; browser cache hits keep their Arc.
Variants§
Owned(DecodedEntity)
Cached(Arc<DecodedEntity>)
Methods from Deref<Target = DecodedEntity>§
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
Sourcepub fn get_refs(&self, index: usize) -> Option<Vec<u32>>
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.
Sourcepub fn get_logical(&self, index: usize) -> Option<Logical>
pub fn get_logical(&self, index: usize) -> Option<Logical>
Get a STEP LOGICAL attribute (see AttributeValue::as_logical).
Sourcepub fn get_bool(&self, index: usize) -> Option<bool>
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.
Sourcepub fn get_enum(&self, index: usize) -> Option<&str>
pub fn get_enum(&self, index: usize) -> Option<&str>
Get an enumeration attribute, seeing through a typed wrapper.
Sourcepub fn get_int(&self, index: usize) -> Option<i64>
pub fn get_int(&self, index: usize) -> Option<i64>
Get an integer attribute (see AttributeValue::as_int).
Sourcepub fn attr(&self, slot: impl AnySlot) -> Option<&AttributeValue>
pub fn attr(&self, slot: impl AnySlot) -> Option<&AttributeValue>
The raw value at a slot or computed position.
Sourcepub fn ref_at(&self, slot: impl Into<SlotIx<Ref>>) -> Option<u32>
pub fn ref_at(&self, slot: impl Into<SlotIx<Ref>>) -> Option<u32>
An entity reference ($ and wrong shapes read as None).
Sourcepub fn ref_list_at(&self, slot: impl Into<SlotIx<RefList>>) -> Option<Vec<u32>>
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.
Sourcepub fn real_at(&self, slot: impl Into<SlotIx<Real>>) -> Option<f64>
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.
Sourcepub fn int_at(&self, slot: impl Into<SlotIx<Int>>) -> Option<i64>
pub fn int_at(&self, slot: impl Into<SlotIx<Int>>) -> Option<i64>
An INTEGER, as AttributeValue::as_int.
Sourcepub fn string_at(&self, slot: impl Into<SlotIx<Text>>) -> Option<&str>
pub fn string_at(&self, slot: impl Into<SlotIx<Text>>) -> Option<&str>
A STRING, its STEP escapes already decoded (as DecodedEntity::get_string).
Sourcepub fn enum_at(&self, slot: impl Into<SlotIx<Enum>>) -> Option<&str>
pub fn enum_at(&self, slot: impl Into<SlotIx<Enum>>) -> Option<&str>
An enumeration literal without its dots (.ELEMENT. reads ELEMENT).
Sourcepub fn logical_at(&self, slot: impl Into<SlotIx<Logical>>) -> Option<bool>
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JobEntity
impl RefUnwindSafe for JobEntity
impl Send for JobEntity
impl Sync for JobEntity
impl Unpin for JobEntity
impl UnwindSafe for JobEntity
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
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 moreSource§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.