pub enum GridTemplateComponent<S: CheapCloneStr> {
Single(TrackSizingFunction),
Repeat(GridTemplateRepetition<S>),
}
Expand description
An element in a grid-template-columns
or grid-template-rows
definition.
Either a track sizing function or a repeat().
See https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns
Variants§
Single(TrackSizingFunction)
A single non-repeated track
Repeat(GridTemplateRepetition<S>)
Automatically generate grid tracks to fit the available space using the specified definite track lengths Only valid if every track in template (not just the repetition) has a fixed size.
Implementations§
Source§impl<S: CheapCloneStr> GridTemplateComponent<S>
impl<S: CheapCloneStr> GridTemplateComponent<S>
Sourcepub fn as_component_ref(
&self,
) -> GenericGridTemplateComponent<S, &GridTemplateRepetition<S>>
pub fn as_component_ref( &self, ) -> GenericGridTemplateComponent<S, &GridTemplateRepetition<S>>
Convert a GridTemplateComponent
into a GridTemplateComponentRef
Source§impl<S: CheapCloneStr> GridTemplateComponent<S>
impl<S: CheapCloneStr> GridTemplateComponent<S>
Sourcepub fn is_auto_repetition(&self) -> bool
pub fn is_auto_repetition(&self) -> bool
Whether the track definition is a auto-repeated fragment
Trait Implementations§
Source§impl<S: Clone + CheapCloneStr> Clone for GridTemplateComponent<S>
impl<S: Clone + CheapCloneStr> Clone for GridTemplateComponent<S>
Source§fn clone(&self) -> GridTemplateComponent<S>
fn clone(&self) -> GridTemplateComponent<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 GridTemplateComponent<S>
impl<S: Debug + CheapCloneStr> Debug for GridTemplateComponent<S>
Source§impl<S: CheapCloneStr> From<MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>> for GridTemplateComponent<S>
impl<S: CheapCloneStr> From<MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>> for GridTemplateComponent<S>
Source§fn from(input: MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>) -> Self
fn from(input: MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>) -> Self
Converts to this type from the input type.
Source§impl<S: CheapCloneStr> FromFr for GridTemplateComponent<S>
impl<S: CheapCloneStr> FromFr for GridTemplateComponent<S>
Source§impl<S: CheapCloneStr> FromLength for GridTemplateComponent<S>
impl<S: CheapCloneStr> FromLength for GridTemplateComponent<S>
Source§impl<S: CheapCloneStr> FromPercent for GridTemplateComponent<S>
impl<S: CheapCloneStr> FromPercent for GridTemplateComponent<S>
Source§impl<S: PartialEq + CheapCloneStr> PartialEq for GridTemplateComponent<S>
impl<S: PartialEq + CheapCloneStr> PartialEq for GridTemplateComponent<S>
Source§impl<S: CheapCloneStr> TaffyAuto for GridTemplateComponent<S>
impl<S: CheapCloneStr> TaffyAuto for GridTemplateComponent<S>
Source§impl<S: CheapCloneStr> TaffyFitContent for GridTemplateComponent<S>
impl<S: CheapCloneStr> TaffyFitContent for GridTemplateComponent<S>
Source§fn fit_content(argument: LengthPercentage) -> Self
fn fit_content(argument: LengthPercentage) -> Self
Converts a LengthPercentage into Self
Source§impl<S: CheapCloneStr> TaffyMaxContent for GridTemplateComponent<S>
impl<S: CheapCloneStr> TaffyMaxContent for GridTemplateComponent<S>
Source§const MAX_CONTENT: Self
const MAX_CONTENT: Self
The max_content value for type implementing TaffyZero
Source§impl<S: CheapCloneStr> TaffyMinContent for GridTemplateComponent<S>
impl<S: CheapCloneStr> TaffyMinContent for GridTemplateComponent<S>
Source§const MIN_CONTENT: Self
const MIN_CONTENT: Self
The min_content value for type implementing TaffyZero
Source§impl<S: CheapCloneStr> TaffyZero for GridTemplateComponent<S>
impl<S: CheapCloneStr> TaffyZero for GridTemplateComponent<S>
impl<S: CheapCloneStr> StructuralPartialEq for GridTemplateComponent<S>
Auto Trait Implementations§
impl<S> Freeze for GridTemplateComponent<S>
impl<S> RefUnwindSafe for GridTemplateComponent<S>where
S: RefUnwindSafe,
impl<S> !Send for GridTemplateComponent<S>
impl<S> !Sync for GridTemplateComponent<S>
impl<S> Unpin for GridTemplateComponent<S>where
S: Unpin,
impl<S> UnwindSafe for GridTemplateComponent<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