Struct delim::Delimited[][src]

pub struct Delimited<'a> { /* fields omitted */ }

Implementations

impl<'a> Delimited<'a>[src]

#[must_use]pub fn new(s: &str) -> Delimited<'_>[src]

Returns a new delimited string.

pub fn bytes<T>(&mut self, bytes: usize) -> Option<T> where
    T: FromStr,
    T::Err: Debug
[src]

Parses a value from a specified number of bytes after the cursor.

Advanced the cursor by the specified number of bytes.

Panics

If the matched value cannot be parsed to the specified type.

pub fn bytes_s<T>(&mut self, bytes: usize) -> &str[src]

Parses a value from a specified number of bytes after the cursor.

Advanced the cursor by the specified number of bytes.

Panics

If the matched value cannot be parsed to the specified type.

#[must_use]pub fn matched<T>(&mut self, delim: &str) -> Option<T> where
    T: FromStr,
    T::Err: Debug
[src]

Returns the next value between the supplied matched delimiters.

Advances the cursor to the end of the matched value, if found.

Panics

If the matched value cannot be parsed to the specified type.

#[must_use]pub fn matched_s(&mut self, delim: &str) -> Option<&'a str>[src]

Returns the next string value between matched delimiters.

Advances the cursor to the end of the matched value, if found.

#[must_use]pub fn mismatched<T>(&mut self, delim_start: &str, delim_end: &str) -> Option<T> where
    T: FromStr,
    T::Err: Debug
[src]

Returns the next value between mismatched delimiters.

Advances the cursor to the end of the matched value, if found.

Panics

If the matched value cannot be parsed to the specified type.

#[must_use]pub fn mismatched_s(
    &mut self,
    delim_start: &str,
    delim_end: &str
) -> Option<&'a str>
[src]

Returns the next string value between mismatched delimiters.

Advances the cursor to the end of the matched value, if found.

Trait Implementations

impl<'a> Debug for Delimited<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Delimited<'a>

impl<'a> Send for Delimited<'a>

impl<'a> Sync for Delimited<'a>

impl<'a> Unpin for Delimited<'a>

impl<'a> UnwindSafe for Delimited<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.