#[non_exhaustive]pub struct PropWrite {
pub pset: String,
pub prop: String,
pub measure_type: String,
pub literal: String,
pub unit: Option<String>,
pub kind: PsetKind,
pub scope: PropScope,
pub target: Option<u32>,
}Expand description
One typed property/quantity write: attach or overwrite prop in pset.
measure_type and literal are already STEP-serialized separately so the
executor can keep the source’s measure wrapper when overwriting an
existing value it does not know the caller meant to change, e.g.
measure_type: "IFCTHERMALTRANSMITTANCEMEASURE", literal: "0.24". unit
is the STEP text of an explicit unit reference ("#55") or literal
("$" for none); None keeps whatever the existing record already
carries, or writes $ for a brand new one.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pset: String§prop: String§measure_type: String§literal: String§unit: Option<String>§kind: PsetKind§scope: PropScope§target: Option<u32>The express id of the exact IfcPropertySingleValue / IfcQuantity*
record to write, when the caller already holds it. The write then
lands on the set named pset that lists that record, however many
sets share that name, and is refused if no set of that name lists it
or the record’s own name is not prop. With PropScope::Occurrence,
a target only the related type’s set holds is not edited in place:
the write lands on the object’s own record of that property, or on a
new copy that overrides it. None finds the first
property of that name in the first set of that name.
Implementations§
Source§impl PropWrite
impl PropWrite
Sourcepub fn new(
pset: impl Into<String>,
prop: impl Into<String>,
measure_type: impl Into<String>,
literal: impl Into<String>,
kind: PsetKind,
scope: PropScope,
) -> Self
pub fn new( pset: impl Into<String>, prop: impl Into<String>, measure_type: impl Into<String>, literal: impl Into<String>, kind: PsetKind, scope: PropScope, ) -> Self
A write into property prop of set pset of literal, STEP text
typed measure_type (PropWrite::new("Pset_WallCommon", "ThermalTransmittance", "IFCTHERMALTRANSMITTANCEMEASURE", "0.24", ..)),
keeping any unit the existing value carries.
Sourcepub fn with_target(self, express_id: u32) -> Self
pub fn with_target(self, express_id: u32) -> Self
Write exactly the value record express_id, not the first property
of this name in the first set of this name. See PropWrite::target.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PropWrite
impl RefUnwindSafe for PropWrite
impl Send for PropWrite
impl Sync for PropWrite
impl Unpin for PropWrite
impl UnwindSafe for PropWrite
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.