Enum Part
pub enum Part<'a>
Formatted parts.
Variants
-
Zero(usize) Given number of zero digits.
-
Num(u16) A literal number up to 5 digits.
-
Copy(&'a [u8]) A verbatim copy of given bytes.
Implementations
impl<'a> Part<'a>
fn len(&self) -> usizeReturns the exact byte length of given part.
fn write(&self, out: &mut [u8]) -> Option<usize>Writes a part into the supplied buffer. Returns the number of written bytes, or
Noneif the buffer is not enough. (It may still leave partially written bytes in the buffer; do not rely on that.)
Trait Implementations
impl<'a> Clone for Part<'a>
fn clone(&self) -> Part<'a>
impl<'a> Copy for Part<'a>
impl<'a> Debug for Part<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> Eq for Part<'a>
fn assert_fields_are_eq(&self)
impl<'a> PartialEq for Part<'a>
fn eq(&self, other: &Part<'a>) -> bool
impl<'a> StructuralPartialEq for Part<'a>
impl<'a> TrivialClone for Part<'a>
Auto Trait Implementations
impl<'a> Freeze for Part<'a>
impl<'a> RefUnwindSafe for Part<'a>
impl<'a> Send for Part<'a>
impl<'a> Sync for Part<'a>
impl<'a> Unpin for Part<'a>
impl<'a> UnsafeUnpin for Part<'a>
impl<'a> UnwindSafe for Part<'a>
Blanket Implementations
impl<T> Any for Part<'a>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Part<'a>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Part<'a>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Part<'a>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Part<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for Part<'a>
where
T: Copy + Debug,
impl<T> SizeHint for Part<'a>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Part<'a>
impl<T, U> Into<U> for Part<'a>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Part<'a>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Part<'a>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>