pub enum LayoutBoxes {
None,
Single(BoxModel),
Multiple(Vec<BoxModel>),
}Variants§
Implementations§
Source§impl LayoutBoxes
impl LayoutBoxes
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Sourcepub fn iter(&self) -> impl Iterator<Item = &BoxModel>
pub fn iter(&self) -> impl Iterator<Item = &BoxModel>
Returns an iterator over references to the contained BoxModels.
The iteration order is:
- empty for
LayoutBoxes::None - a single element for
LayoutBoxes::Single - the order of elements in the inner vector for
LayoutBoxes::Multiple
This method provides a convenient way to iterate over all boxes regardless of the internal representation.
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut BoxModel>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut BoxModel>
Returns an iterator over mutable references to the contained BoxModels.
The iteration order is:
- empty for
LayoutBoxes::None - a single element for
LayoutBoxes::Single - the order of elements in the inner vector for
LayoutBoxes::Multiple
This allows in-place modification of all boxes in a uniform way.
Trait Implementations§
Source§impl Clone for LayoutBoxes
impl Clone for LayoutBoxes
Source§fn clone(&self) -> LayoutBoxes
fn clone(&self) -> LayoutBoxes
Returns a duplicate 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 moreSource§impl Debug for LayoutBoxes
impl Debug for LayoutBoxes
Source§impl Default for LayoutBoxes
impl Default for LayoutBoxes
Source§fn default() -> LayoutBoxes
fn default() -> LayoutBoxes
Returns the “default value” for a type. Read more
Source§impl<'a> IntoIterator for &'a LayoutBoxes
impl<'a> IntoIterator for &'a LayoutBoxes
Source§impl<'a> IntoIterator for &'a mut LayoutBoxes
impl<'a> IntoIterator for &'a mut LayoutBoxes
Auto Trait Implementations§
impl Freeze for LayoutBoxes
impl RefUnwindSafe for LayoutBoxes
impl Send for LayoutBoxes
impl Sync for LayoutBoxes
impl Unpin for LayoutBoxes
impl UnwindSafe for LayoutBoxes
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