Struct path2regex::CompilerBuilder
source · pub struct CompilerBuilder<I> { /* private fields */ }
Available on crate feature
compile
only.Expand description
The Builder of the Compiler
Implementations§
source§impl<I> CompilerBuilder<I>where
I: TryIntoWith<Vec<Token>, ParserOptions>,
impl<I> CompilerBuilder<I>where
I: TryIntoWith<Vec<Token>, ParserOptions>,
sourcepub fn new_with_options(source: I, options: CompilerOptions) -> Self
pub fn new_with_options(source: I, options: CompilerOptions) -> Self
Create a builder of the Compiler
with the options
sourcepub fn set_delimiter<S>(&mut self, delimiter: S) -> &mut Selfwhere
S: AsRef<str>,
pub fn set_delimiter<S>(&mut self, delimiter: S) -> &mut Selfwhere
S: AsRef<str>,
Set the default delimiter for repeat parameters. (default: '/'
)
sourcepub fn set_prefixes<S>(&mut self, prefixes: S) -> &mut Selfwhere
S: AsRef<str>,
pub fn set_prefixes<S>(&mut self, prefixes: S) -> &mut Selfwhere
S: AsRef<str>,
List of characters to automatically consider prefixes when parsing.
sourcepub fn set_sensitive(&mut self, yes: bool) -> &mut Self
pub fn set_sensitive(&mut self, yes: bool) -> &mut Self
When true
the regexp will be case sensitive. (default: false
)
sourcepub fn set_encode(
&mut self,
encode: for<'a> fn(_: &'a str, _: &'a Key) -> String
) -> &mut Self
pub fn set_encode(
&mut self,
encode: for<'a> fn(_: &'a str, _: &'a Key) -> String
) -> &mut Self
Function for encoding input strings for output.
sourcepub fn set_validate(&mut self, validate: bool) -> &mut Self
pub fn set_validate(&mut self, validate: bool) -> &mut Self
Trait Implementations§
source§impl<I: Clone> Clone for CompilerBuilder<I>
impl<I: Clone> Clone for CompilerBuilder<I>
source§fn clone(&self) -> CompilerBuilder<I>
fn clone(&self) -> CompilerBuilder<I>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more