pub struct Label { /* private fields */ }Expand description
Text for one options row value, held inline.
Every label is upper-case ASCII, so it draws with any font that has
capitals and digits. The longest, BRIGHTER 5 and RIGHT 127, fit with
room to spare; Label::CAPACITY is large enough for any i8 step.
Implementations§
Source§impl Label
impl Label
Sourcepub const CAPACITY: usize = 12
pub const CAPACITY: usize = 12
Bytes a label can hold: the longest word plus a space and a three-digit step.
Sourcepub const fn word(word: &[u8]) -> Self
pub const fn word(word: &[u8]) -> Self
A label that reads word alone, such as DEFAULT or CENTRE.
Sourcepub const fn toward(word: &[u8], steps: u8) -> Self
pub const fn toward(word: &[u8], steps: u8) -> Self
A label that reads word, a space and the decimal digits of steps,
such as DARKER 3.
Trait Implementations§
impl Copy for Label
impl Eq for Label
impl StructuralPartialEq for Label
Auto Trait Implementations§
impl Freeze for Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnsafeUnpin for Label
impl UnwindSafe for Label
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)