pub struct ComponentSpan {
pub columns: u8,
pub rows: Option<u8>,
}Expand description
Column span configuration for grid layout
Fields§
§columns: u8Number of columns to span (1-12)
rows: Option<u8>Optional row span for multi-row components
Implementations§
Source§impl ComponentSpan
impl ComponentSpan
Sourcepub fn with_rows(columns: u8, rows: u8) -> Self
pub fn with_rows(columns: u8, rows: u8) -> Self
Create a span with both column and row specification
Sourcepub fn as_fraction(&self) -> f64
pub fn as_fraction(&self) -> f64
Get column span as a fraction (0.0-1.0)
Sourcepub fn is_full_width(&self) -> bool
pub fn is_full_width(&self) -> bool
Check if this is a full-width component
Sourcepub fn is_half_width(&self) -> bool
pub fn is_half_width(&self) -> bool
Check if this is a half-width component
Sourcepub fn is_quarter_width(&self) -> bool
pub fn is_quarter_width(&self) -> bool
Check if this is a quarter-width component
Trait Implementations§
Source§impl Clone for ComponentSpan
impl Clone for ComponentSpan
Source§fn clone(&self) -> ComponentSpan
fn clone(&self) -> ComponentSpan
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 ComponentSpan
impl Debug for ComponentSpan
Source§impl From<u8> for ComponentSpan
impl From<u8> for ComponentSpan
Source§impl PartialEq for ComponentSpan
impl PartialEq for ComponentSpan
impl Copy for ComponentSpan
impl Eq for ComponentSpan
impl StructuralPartialEq for ComponentSpan
Auto Trait Implementations§
impl Freeze for ComponentSpan
impl RefUnwindSafe for ComponentSpan
impl Send for ComponentSpan
impl Sync for ComponentSpan
impl Unpin for ComponentSpan
impl UnwindSafe for ComponentSpan
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> 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