pub enum Size {
Absolute {
initial: f32,
range: Rangef,
},
Relative {
fraction: f32,
range: Rangef,
},
Remainder {
range: Rangef,
},
}
Expand description
Size hint for table column/strip cell.
Variants§
Absolute
Absolute size in points, with a given range of allowed sizes to resize within.
Relative
Relative size relative to all available space.
Remainder
Multiple remainders each get the same space.
Implementations§
source§impl Size
impl Size
sourcepub fn relative(fraction: f32) -> Self
pub fn relative(fraction: f32) -> Self
Relative size relative to all available space. Values must be in range 0.0..=1.0
.
pub fn with_range(self, range: Rangef) -> Self
pub fn range_mut(&mut self) -> &mut Rangef
pub fn is_absolute(&self) -> bool
pub fn is_relative(&self) -> bool
pub fn is_remainder(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnwindSafe for Size
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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