pub struct Term {
pub value: String,
pub label: Option<String>,
pub description: Option<String>,
pub retired: bool,
pub tint: Option<Tint>,
}Expand description
One term of a controlled vocabulary.
Fields§
§value: StringThe stored value.
label: Option<String>A human display label (defaults to value — see Term::display_label).
description: Option<String>A human gloss / help text.
retired: boolKnown but no longer offered: still valid where already present, excluded
from the picker’s offered set. Validating one yields Validation::Warn
rather than Validation::Reject, even under a closed vocabulary — see
validate_enum.
tint: Option<Tint>A per-value tint (e.g. public = positive/green).
Implementations§
Source§impl Term
impl Term
Sourcepub fn display_label(&self) -> &str
pub fn display_label(&self) -> &str
The text to display for this term: Term::label if set, otherwise the
stored Term::value.
Trait Implementations§
impl Eq for Term
impl StructuralPartialEq for Term
Auto Trait Implementations§
impl Freeze for Term
impl RefUnwindSafe for Term
impl Send for Term
impl Sync for Term
impl Unpin for Term
impl UnsafeUnpin for Term
impl UnwindSafe for Term
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