pub struct LayoutSnapshot {
pub id: usize,
pub bin: Bin,
pub placed_items: SlotMap<PItemKey, PlacedItem>,
pub cde_snapshot: CDESnapshot,
pub usage: fsize,
}
Expand description
Immutable and compact representation of a Layout.
Layout
s can create LayoutSnapshot
s, and revert back themselves to a previous state using them.
Fields§
§id: usize
The unique identifier of the layout, used only to match with a Layout.
bin: Bin
The bin used for this layout
placed_items: SlotMap<PItemKey, PlacedItem>
How the items are placed in the bin
cde_snapshot: CDESnapshot
The collision detection engine snapshot for this layout
usage: fsize
The usage of the bin with the items placed
Trait Implementations§
Source§impl Clone for LayoutSnapshot
impl Clone for LayoutSnapshot
Source§fn clone(&self) -> LayoutSnapshot
fn clone(&self) -> LayoutSnapshot
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for LayoutSnapshot
impl RefUnwindSafe for LayoutSnapshot
impl Send for LayoutSnapshot
impl Sync for LayoutSnapshot
impl Unpin for LayoutSnapshot
impl UnwindSafe for LayoutSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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