pub enum GridTemplateComponent<S>where
S: CheapCloneStr,{
Single(MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>),
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(MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>)
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> GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> GridTemplateComponent<S>where
S: CheapCloneStr,
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> GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> GridTemplateComponent<S>where
S: CheapCloneStr,
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 for GridTemplateComponent<S>where
S: Clone + CheapCloneStr,
impl<S> Clone for GridTemplateComponent<S>where
S: Clone + CheapCloneStr,
Source§fn clone(&self) -> GridTemplateComponent<S>
fn clone(&self) -> GridTemplateComponent<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 for GridTemplateComponent<S>where
S: Debug + CheapCloneStr,
impl<S> Debug for GridTemplateComponent<S>where
S: Debug + CheapCloneStr,
Source§impl<S> From<MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>> for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> From<MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>> for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§fn from(
input: MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>,
) -> GridTemplateComponent<S>
fn from( input: MinMax<MinTrackSizingFunction, MaxTrackSizingFunction>, ) -> GridTemplateComponent<S>
Converts to this type from the input type.
Source§impl<S> FromFr for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> FromFr for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§impl<S> FromLength for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> FromLength for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§fn from_length<Input>(value: Input) -> GridTemplateComponent<S>
fn from_length<Input>(value: Input) -> GridTemplateComponent<S>
Converts into an
Into<f32> into SelfSource§impl<S> FromPercent for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> FromPercent for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§fn from_percent<Input>(percent: Input) -> GridTemplateComponent<S>
fn from_percent<Input>(percent: Input) -> GridTemplateComponent<S>
Converts into an
Into<f32> into SelfSource§impl<S> PartialEq for GridTemplateComponent<S>where
S: PartialEq + CheapCloneStr,
impl<S> PartialEq for GridTemplateComponent<S>where
S: PartialEq + CheapCloneStr,
Source§fn eq(&self, other: &GridTemplateComponent<S>) -> bool
fn eq(&self, other: &GridTemplateComponent<S>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<S> TaffyAuto for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> TaffyAuto for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§const AUTO: GridTemplateComponent<S>
const AUTO: GridTemplateComponent<S>
The auto value for type implementing TaffyAuto
Source§impl<S> TaffyFitContent for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> TaffyFitContent for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§fn fit_content(argument: LengthPercentage) -> GridTemplateComponent<S>
fn fit_content(argument: LengthPercentage) -> GridTemplateComponent<S>
Converts a LengthPercentage into Self
Source§impl<S> TaffyMaxContent for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> TaffyMaxContent for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§const MAX_CONTENT: GridTemplateComponent<S>
const MAX_CONTENT: GridTemplateComponent<S>
The max_content value for type implementing TaffyZero
Source§impl<S> TaffyMinContent for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> TaffyMinContent for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§const MIN_CONTENT: GridTemplateComponent<S>
const MIN_CONTENT: GridTemplateComponent<S>
The min_content value for type implementing TaffyZero
Source§impl<S> TaffyZero for GridTemplateComponent<S>where
S: CheapCloneStr,
impl<S> TaffyZero for GridTemplateComponent<S>where
S: CheapCloneStr,
Source§const ZERO: GridTemplateComponent<S>
const ZERO: GridTemplateComponent<S>
The zero value for type implementing TaffyZero
impl<S> StructuralPartialEq for GridTemplateComponent<S>where
S: CheapCloneStr,
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> UnsafeUnpin for GridTemplateComponent<S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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