Trait DataParseExt

Source
pub trait DataParseExt
where Self: Sized,
{ // Required methods fn split_off(&mut self, pat: &[u8]) -> Option<Self>; fn trimmed(&self) -> Self; }
Expand description

Some parsing extensions for Data

Required Methods§

Source

fn split_off(&mut self, pat: &[u8]) -> Option<Self>

Splits self on the first occurrence of pat and returns prefix before delimiter; self is updated to hold the remaining suffix after pat

§Note

This method uses the cheapest way to clone the data by e.g. performing an Rc::clone on Self::RcVec

Source

fn trimmed(&self) -> Self

Trims leading and trailing ASCII whitespaces

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§