pub enum SegmentDisplay {
Auto,
Text,
Icon,
IconText,
}Expand description
What a segment paints: its icon, its label, or both.
Set on the control with
SegmentedControl::display; it
applies to every segment. Mirrors TabWidget’s TabDisplayMode.
Icon-only is the classic compact fallback before overflow kicks in:
a bar of icon-only segments fits far more of them, so switching to
Icon can be the difference between a
complete strip and a chevron menu.
Variants§
Auto
Paint whatever the segment declares — icon and label when both
are present, label alone otherwise. The default, and the
behaviour of every SegmentedControl before this mode existed.
Text
Label only. A declared icon is suppressed.
Icon
Icon only; the label is promoted to the hover tooltip (unless the segment already declares one). A segment with no icon falls back to its label, so the mode is never a silent no-op.
IconText
Icon and label. Identical to Auto for a
segment that declares both; kept for parity with
TabDisplayMode so a caller can be explicit.
Trait Implementations§
Source§impl Clone for SegmentDisplay
impl Clone for SegmentDisplay
Source§fn clone(&self) -> SegmentDisplay
fn clone(&self) -> SegmentDisplay
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SegmentDisplay
Source§impl Debug for SegmentDisplay
impl Debug for SegmentDisplay
Source§impl Default for SegmentDisplay
impl Default for SegmentDisplay
Source§fn default() -> SegmentDisplay
fn default() -> SegmentDisplay
impl Eq for SegmentDisplay
Source§impl PartialEq for SegmentDisplay
impl PartialEq for SegmentDisplay
Source§fn eq(&self, other: &SegmentDisplay) -> bool
fn eq(&self, other: &SegmentDisplay) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SegmentDisplay
Auto Trait Implementations§
impl Freeze for SegmentDisplay
impl RefUnwindSafe for SegmentDisplay
impl Send for SegmentDisplay
impl Sync for SegmentDisplay
impl Unpin for SegmentDisplay
impl UnsafeUnpin for SegmentDisplay
impl UnwindSafe for SegmentDisplay
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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