asimov_core

Trait MaybeLabeled

source
pub trait MaybeLabeled {
    // Required method
    fn label(&self) -> Option<Cow<'_, str>>;

    // Provided method
    fn is_labeled(&self) -> bool { ... }
}
Expand description

A trait for objects that may have a human-readable label.

Required Methods§

source

fn label(&self) -> Option<Cow<'_, str>>

Returns the human-readable label, if any, of the object.

Provided Methods§

source

fn is_labeled(&self) -> bool

Checks whether the object has a human-readable label.

Implementors§