Struct nommy::text::Tag[][src]

pub struct Tag<const TAG: &'static str>;

Tag is a generic type that implements Parse to match the given string exactly

use nommy::{Parse, IntoBuf, text::Tag};
let mut buffer = "foobarbaz".chars().into_buf();
Tag::<"foobar">::parse(&mut buffer).unwrap();
Tag::<"baz">::parse(&mut buffer).unwrap();

Trait Implementations

impl<const TAG: &'static str> Clone for Tag<TAG>[src]

impl<const TAG: &'static str> Copy for Tag<TAG>[src]

impl<const TAG: &'static str> Debug for Tag<TAG>[src]

impl<const TAG: &'static str> Parse<char> for Tag<TAG>[src]

impl<const TAG: &'static str> PartialEq<Tag<TAG>> for Tag<TAG>[src]

impl<const TAG: &'static str> StructuralPartialEq for Tag<TAG>[src]

Auto Trait Implementations

impl<const TAG: &'static str> RefUnwindSafe for Tag<TAG>[src]

impl<const TAG: &'static str> Send for Tag<TAG>[src]

impl<const TAG: &'static str> Sync for Tag<TAG>[src]

impl<const TAG: &'static str> Unpin for Tag<TAG>[src]

impl<const TAG: &'static str> UnwindSafe for Tag<TAG>[src]

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> 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.