Struct PatternParser

Source
struct PatternParser<F>
where F: Fn(&str) -> Result<String, Error>,
{ token_list: Vec<Token>, encoding_callback: F, segment_wildcard_regexp: String, part_list: Vec<Part>, pending_fixed_value: String, index: usize, next_numeric_name: usize, }

Fields§

§token_list: Vec<Token>§encoding_callback: F§segment_wildcard_regexp: String§part_list: Vec<Part>§pending_fixed_value: String§index: usize§next_numeric_name: usize

Implementations§

Source§

impl<F> PatternParser<F>
where F: Fn(&str) -> Result<String, Error>,

Source

fn try_consume_token(&mut self, kind: TokenType) -> Option<Token>

Source

fn try_consume_regexp_or_wildcard_token( &mut self, name_token_is_none: bool, ) -> Option<Token>

Source

fn try_consume_modifier_token(&mut self) -> Option<Token>

Source

fn maybe_add_part_from_pending_fixed_value(&mut self) -> Result<(), Error>

Source

fn add_part( &mut self, prefix: &str, name_token: Option<Token>, regexp_or_wildcard_token: Option<Token>, suffix: &str, modifier_token: Option<Token>, ) -> Result<(), Error>

Source

fn is_duplicate_name(&self, name: &str) -> bool

Source

fn consume_text(&mut self) -> String

Source

fn consume_required_token(&mut self, kind: TokenType) -> Result<Token, Error>

Auto Trait Implementations§

§

impl<F> Freeze for PatternParser<F>
where F: Freeze,

§

impl<F> RefUnwindSafe for PatternParser<F>
where F: RefUnwindSafe,

§

impl<F> Send for PatternParser<F>
where F: Send,

§

impl<F> Sync for PatternParser<F>
where F: Sync,

§

impl<F> Unpin for PatternParser<F>
where F: Unpin,

§

impl<F> UnwindSafe for PatternParser<F>
where F: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T