Struct StrippedBytes

pub struct StrippedBytes<'s> { /* private fields */ }

See strip_bytes

Implementations

impl<'s> StrippedBytes<'s>

fn new(bytes: &'s [u8]) -> Self

See strip_bytes

fn extend(&mut self, bytes: &'s [u8])

Strip the next slice of bytes

Used when the content is in several non-contiguous slices

Panic

May panic if it is not exhausted / empty

fn is_empty(&self) -> bool

Report the bytes has been exhausted

fn into_vec(self) -> Vec<u8>

Create a Vec of the printable content

Trait Implementations

impl<'s> Clone for StrippedBytes<'s>

fn clone(&self) -> Self

impl<'s> Debug for StrippedBytes<'s>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<'s> Default for StrippedBytes<'s>

fn default() -> Self

impl<'s> Eq for StrippedBytes<'s>

impl<'s> Iterator for StrippedBytes<'s>

type Item = &'s [u8];
fn next(&mut self) -> Option<Self::Item>

impl<'s> PartialEq for StrippedBytes<'s>

fn eq(&self, other: &Self) -> bool

impl<'s> StructuralPartialEq for StrippedBytes<'s>

Auto Trait Implementations

impl<'s> Freeze for StrippedBytes<'s>

impl<'s> RefUnwindSafe for StrippedBytes<'s>

impl<'s> Send for StrippedBytes<'s>

impl<'s> Sync for StrippedBytes<'s>

impl<'s> Unpin for StrippedBytes<'s>

impl<'s> UnsafeUnpin for StrippedBytes<'s>

impl<'s> UnwindSafe for StrippedBytes<'s>

Blanket Implementations

impl<I> IntoIterator for StrippedBytes<'s> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

impl<T> Any for StrippedBytes<'s> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for StrippedBytes<'s> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for StrippedBytes<'s> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for StrippedBytes<'s> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for StrippedBytes<'s>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for StrippedBytes<'s> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for StrippedBytes<'s> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for StrippedBytes<'s> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for StrippedBytes<'s> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>