[][src]Enum media_type_impl_utils::quoted_string::FWSState

pub enum FWSState {
    HitCr,
    HitNl,
    HadFws,
}

A enum to represent the sate in a quoted string parser for specifications with FWS

FWS are forward white spaces, they can appear in media-types in the mime specification a FWS is a "\r\n" seq followed by either ' ' or '\t'.

Variants

HitCr

the state after the first '\r'

HitNl

the state after "\r\n"

HadFws

the state after "\r\n " or "\r\n\t" + any number of ws chars

Methods

impl FWSState[src]

pub fn advance<Impl: MimeParsingExt>(
    self,
    bch: PartialCodePoint
) -> Result<(State<Impl>, bool), CoreError>
[src]

default implementation for handing FWSState state transitions

Handles the state transition wrt. a given MimeParsingExt implementation. It assures that after a \r only \n can follow and after a \n either ' ' or '\t' has to follow. Lastly it makes sure that between two FWS there has to be at last one non ws character (at last in the non obs grammar).

Trait Implementations

impl Clone for FWSState[src]

impl Copy for FWSState[src]

impl Eq for FWSState[src]

impl PartialEq<FWSState> for FWSState[src]

impl Debug for FWSState[src]

impl Hash for FWSState[src]

Auto Trait Implementations

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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