[−][src]Struct simble::Printable
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
).
Methods
impl Printable
[src]
pub fn len(self) -> usize
[src]
Return the length of this symbol.
pub fn into_bytes(self) -> [u8; 8]
[src]
Convert a Printable into a byte array. The result is right-padded with NUL bytes.
pub fn as_ptr(&self) -> *const u8
[src]
Obtain a pointer to the first byte.
pub fn as_bytes(&self) -> &[u8]
[src]
Borrow as a byte slice.
pub fn as_str(&self) -> &str
[src]
Borrow as a &str
.
ⓘImportant traits for Bytespub fn bytes(self) -> Bytes
[src]
ⓘImportant traits for Bytes
Obtain an iterator over the bytes.
pub fn to_lexical(self) -> Lexical
[src]
Convert to a lexically-sortable symbol.
Trait Implementations
impl From<Lexical> for Printable
[src]
impl From<Printable> for Lexical
[src]
impl Display for Printable
[src]
impl Debug for Printable
[src]
impl PartialEq<Printable> for Printable
[src]
impl PartialEq<str> for Printable
[src]
impl PartialEq<Printable> for str
[src]
impl Eq for Printable
[src]
impl Ord for Printable
[src]
fn cmp(&self, other: &Printable) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialOrd<Printable> for Printable
[src]
fn partial_cmp(&self, other: &Printable) -> Option<Ordering>
[src]
fn lt(&self, other: &Printable) -> bool
[src]
fn le(&self, other: &Printable) -> bool
[src]
fn gt(&self, other: &Printable) -> bool
[src]
fn ge(&self, other: &Printable) -> bool
[src]
impl PartialOrd<str> for Printable
[src]
fn partial_cmp(&self, s: &str) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Printable> for str
[src]
fn partial_cmp(&self, p: &Printable) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl FromStr for Printable
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Error>
[src]
impl Hash for Printable
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Copy for Printable
[src]
impl StructuralPartialEq for Printable
[src]
impl StructuralEq for Printable
[src]
impl AsRef<[u8]> for Printable
[src]
impl AsRef<str> for Printable
[src]
impl Clone for Printable
[src]
fn clone(&self) -> Printable
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,