#[non_exhaustive]pub enum Disposition {
Preserve,
Patch(Patch),
Delete,
Add(Box<NewObject>),
AddType(Box<NewType>),
}Expand description
What one object should become in the output.
Patch is much larger than the other variants. A plan holds one of these
per object it names, so the space is not worth an indirection in the
public shape.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Preserve
Keep the record(s) exactly as the source wrote them.
Patch(Patch)
Apply the given edits; any field left None/empty is untouched.
Delete
Remove the object and repair every relationship that named it.
A relationship whose required side goes empty is removed; one that keeps a member is rewritten. Records only deleted objects used (placements, geometry, property sets) are pruned. Objects and types the plan does not delete are never pruned: a port nested on a deleted host stays as a free product, a type whose occurrences are all deleted stays declared. The exception is an opening or projection, which IFC ties to exactly one element: it goes once no voids or projects relationship naming it is left (its host or that relationship deleted), whatever else still names it, unless an Add names it; a patch on it is refused. A record that names a deleted one through a single-valued attribute (a placement relative to a deleted placement, an object on that placement) goes too, since it cannot be written without a dangling reference.
Add(Box<NewObject>)
Build a new object from its IFC-level description. Boxed because the description is much larger than the other variants.
AddType(Box<NewType>)
Add a type with no occurrence. It must have its own GlobalId
(NewType::global_id) and a name; the plan key names it in refusals
and, like an Add’s, must not resolve to anything in the source, and
when it is a GlobalId must be the type’s own. In IFC4 and IFC4X3 it is declared
to the project through IfcRelDeclares; IFC2X3 has no such
relationship, so there it is written on its own. A later Add in the
same plan can be typed by it through TypeLink::Existing.
Trait Implementations§
Source§impl Clone for Disposition
impl Clone for Disposition
Source§fn clone(&self) -> Disposition
fn clone(&self) -> Disposition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Disposition
impl RefUnwindSafe for Disposition
impl Send for Disposition
impl Sync for Disposition
impl Unpin for Disposition
impl UnwindSafe for Disposition
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.