#[non_exhaustive]pub enum Mapped {
Kept(UnitId),
Split {
first: UnitId,
second: UnitId,
},
Removed,
}Expand description
What became of one unit of the original graph.
Match with a wildcard arm, or use Mapped::primary and Mapped::secondary: a later
transformation may map a unit in a way that does not exist yet.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Kept(UnitId)
The unit survived unchanged, under a new identifier.
Split
The unit was divided in two.
Fields
Removed
The unit is not in the new graph.
Implementations§
Source§impl Mapped
impl Mapped
Sourcepub const fn primary(self) -> Option<UnitId>
pub const fn primary(self) -> Option<UnitId>
The new identifier that best stands for the original unit, or None if it was removed.
For a split, this is the first part.
Sourcepub const fn secondary(self) -> Option<UnitId>
pub const fn secondary(self) -> Option<UnitId>
The second new identifier, for a mapping that produced two units.
Sourcepub const fn is_removed(self) -> bool
pub const fn is_removed(self) -> bool
Whether the unit is absent from the new graph.
Trait Implementations§
impl Copy for Mapped
impl Eq for Mapped
impl StructuralPartialEq for Mapped
Auto Trait Implementations§
impl Freeze for Mapped
impl RefUnwindSafe for Mapped
impl Send for Mapped
impl Sync for Mapped
impl Unpin for Mapped
impl UnsafeUnpin for Mapped
impl UnwindSafe for Mapped
Blanket Implementations§
Source§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
Mutably borrows from an owned value. Read more