pub struct SegmentedItem {
pub label: String,
pub href: String,
pub active: bool,
pub aria_label: Option<String>,
}Expand description
One segment of a SegmentedControl.
Fields§
§label: StringVisible label or glyph.
href: StringDestination URL — segments render as <a href> so they work without JS.
active: boolActive segment (one per group, typically). Highlighted, aria-selected=true.
aria_label: Option<String>Optional accessible label override — useful when label is a glyph
like “←” or “→” that screen readers cannot pronounce.
Trait Implementations§
Source§impl Clone for SegmentedItem
impl Clone for SegmentedItem
Source§fn clone(&self) -> SegmentedItem
fn clone(&self) -> SegmentedItem
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 Debug for SegmentedItem
impl Debug for SegmentedItem
Source§impl Default for SegmentedItem
impl Default for SegmentedItem
Source§fn default() -> SegmentedItem
fn default() -> SegmentedItem
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SegmentedItem
impl<'de> Deserialize<'de> for SegmentedItem
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for SegmentedItem
impl JsonSchema for SegmentedItem
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for SegmentedItem
impl PartialEq for SegmentedItem
Source§fn eq(&self, other: &SegmentedItem) -> bool
fn eq(&self, other: &SegmentedItem) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SegmentedItem
impl Serialize for SegmentedItem
impl StructuralPartialEq for SegmentedItem
Auto Trait Implementations§
impl Freeze for SegmentedItem
impl RefUnwindSafe for SegmentedItem
impl Send for SegmentedItem
impl Sync for SegmentedItem
impl Unpin for SegmentedItem
impl UnsafeUnpin for SegmentedItem
impl UnwindSafe for SegmentedItem
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