pub struct Printable(_);
Expand description
Symbol that can be borrowed directly as a &[str
] or &[u8]
. Comparison is supported, but order is
unspecified and must not be relied on (for predictable sorting, use Lexical
).
Implementations
sourceimpl Printable
impl Printable
sourcepub fn into_bytes(self) -> [u8; 8]
pub fn into_bytes(self) -> [u8; 8]
Convert a Printable into a byte array. The result is right-padded with NUL bytes.
sourcepub fn to_lexical(self) -> Lexical
pub fn to_lexical(self) -> Lexical
Convert to a lexically-sortable symbol.
Trait Implementations
sourceimpl Ord for Printable
impl Ord for Printable
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Printable> for Printable
impl PartialOrd<Printable> for Printable
sourcefn partial_cmp(&self, other: &Printable) -> Option<Ordering>
fn partial_cmp(&self, other: &Printable) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Printable> for str
impl PartialOrd<Printable> for str
sourcefn partial_cmp(&self, p: &Printable) -> Option<Ordering>
fn partial_cmp(&self, p: &Printable) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<str> for Printable
impl PartialOrd<str> for Printable
impl Copy for Printable
impl Eq for Printable
impl StructuralEq for Printable
impl StructuralPartialEq for Printable
Auto Trait Implementations
impl RefUnwindSafe for Printable
impl Send for Printable
impl Sync for Printable
impl Unpin for Printable
impl UnwindSafe for Printable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more