pub enum SectionSize {
Fixed(u16),
Percent(f32),
Weight(f32),
Content,
EqualShare,
}Expand description
Sizing strategy for a single section along the main axis.
Different sections in the same view can use different strategies —
e.g. an SC panel might be [Fixed(3) /* commit input */, EqualShare, EqualShare, EqualShare].
Variants§
Fixed(u16)
Exact size in main-axis units (cells / pixels).
Percent(f32)
Share of the original container, 0.0..=1.0. Allocated against
the original container size, not the post-fixed remainder. On
total overflow, all percent allocations scale down proportionally.
Weight(f32)
Proportional weight (CSS flex semantics). Sections share the
post-fixed-and-percent remainder by their weight ratios. Weights
<= 0.0 are treated as zero (the section gets only its min_size).
Content
Size to the body’s natural content height; clamped between
min_size and max_size if the section has those set.
Equal share of the post-fixed-and-percent-and-weight remainder
among all EqualShare sections.
Trait Implementations§
Source§impl Clone for SectionSize
impl Clone for SectionSize
impl Copy for SectionSize
Source§impl Debug for SectionSize
impl Debug for SectionSize
Source§impl Default for SectionSize
impl Default for SectionSize
Source§impl<'de> Deserialize<'de> for SectionSize
impl<'de> Deserialize<'de> for SectionSize
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SectionSize
impl PartialEq for SectionSize
Source§impl Serialize for SectionSize
impl Serialize for SectionSize
impl StructuralPartialEq for SectionSize
Auto Trait Implementations§
impl Freeze for SectionSize
impl RefUnwindSafe for SectionSize
impl Send for SectionSize
impl Sync for SectionSize
impl Unpin for SectionSize
impl UnsafeUnpin for SectionSize
impl UnwindSafe for SectionSize
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> ⓘ
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> ⓘ
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