pub enum GridPlacement<S: CheapCloneStr = String> {
Auto,
Line(GridLine),
NamedLine(S, i16),
Span(u16),
NamedSpan(S, u16),
}
Expand description
A grid line placement specification. Used for grid-[row/column]-[start/end]. Named tracks are not implemented.
Defaults to GridPlacement::Auto
Variants§
Auto
Place item according to the auto-placement algorithm, and the parent’s grid_auto_flow property
Line(GridLine)
Place item at specified line (column or row) index
NamedLine(S, i16)
Place item at specified named line (column or row)
Span(u16)
Item should span specified number of tracks (columns or rows)
NamedSpan(S, u16)
Item should span until the nth line named
If there are less than n lines named
Implementations§
Source§impl<S: CheapCloneStr> GridPlacement<S>
impl<S: CheapCloneStr> GridPlacement<S>
Sourcepub fn into_origin_zero_placement_ignoring_named(
&self,
explicit_track_count: u16,
) -> GenericGridPlacement<OriginZeroLine>
pub fn into_origin_zero_placement_ignoring_named( &self, explicit_track_count: u16, ) -> GenericGridPlacement<OriginZeroLine>
Apply a mapping function if the GridPlacement
is a Line
. Otherwise return self
unmodified.
Trait Implementations§
Source§impl<S: Clone + CheapCloneStr> Clone for GridPlacement<S>
impl<S: Clone + CheapCloneStr> Clone for GridPlacement<S>
Source§fn clone(&self) -> GridPlacement<S>
fn clone(&self) -> GridPlacement<S>
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<S: Debug + CheapCloneStr> Debug for GridPlacement<S>
impl<S: Debug + CheapCloneStr> Debug for GridPlacement<S>
Source§impl<S: CheapCloneStr> Default for GridPlacement<S>
impl<S: CheapCloneStr> Default for GridPlacement<S>
Source§impl<S: PartialEq + CheapCloneStr> PartialEq for GridPlacement<S>
impl<S: PartialEq + CheapCloneStr> PartialEq for GridPlacement<S>
Source§impl<S: CheapCloneStr> TaffyAuto for GridPlacement<S>
impl<S: CheapCloneStr> TaffyAuto for GridPlacement<S>
Source§impl<S: CheapCloneStr> TaffyGridLine for GridPlacement<S>
impl<S: CheapCloneStr> TaffyGridLine for GridPlacement<S>
Source§fn from_line_index(index: i16) -> Self
fn from_line_index(index: i16) -> Self
Converts an i16 into Self
Source§impl<S: CheapCloneStr> TaffyGridSpan for GridPlacement<S>
impl<S: CheapCloneStr> TaffyGridSpan for GridPlacement<S>
impl<S: CheapCloneStr> StructuralPartialEq for GridPlacement<S>
Auto Trait Implementations§
impl<S> Freeze for GridPlacement<S>where
S: Freeze,
impl<S> RefUnwindSafe for GridPlacement<S>where
S: RefUnwindSafe,
impl<S> Send for GridPlacement<S>where
S: Send,
impl<S> Sync for GridPlacement<S>where
S: Sync,
impl<S> Unpin for GridPlacement<S>where
S: Unpin,
impl<S> UnwindSafe for GridPlacement<S>where
S: UnwindSafe,
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