pub struct CompiledPattern { /* private fields */ }Implementations§
Source§impl CompiledPattern
impl CompiledPattern
Sourcepub fn compile(pattern: &str) -> Result<Self, ParseError>
pub fn compile(pattern: &str) -> Result<Self, ParseError>
Compile a TEL pattern into validated typed segments.
§Errors
Returns ParseError::InvalidPattern when the source contains an unsupported or
semantically invalid TEL construct.
pub fn source(&self) -> &str
pub fn token_info(&self) -> &[TokenInfo]
pub const fn parsed(&self) -> &ParsedPattern
pub fn segments(&self) -> &[TelSegment]
pub const fn class_plan(&self) -> &CompiledClassPlan
pub fn class_segments(&self) -> &[CompiledClassSegment]
pub fn class_pattern(&self, mode: MatchMode) -> &str
Sourcepub fn class_regex(&self, mode: MatchMode) -> Result<&Pcre2Regex, ParseError>
pub fn class_regex(&self, mode: MatchMode) -> Result<&Pcre2Regex, ParseError>
Return the lazily compiled class-comparator regex for the requested match mode.
§Errors
Returns ParseError::InvalidPattern if the generated class comparator regex is invalid.
Trait Implementations§
Source§impl Clone for CompiledPattern
impl Clone for CompiledPattern
Source§fn clone(&self) -> CompiledPattern
fn clone(&self) -> CompiledPattern
Returns a duplicate 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 moreSource§impl Debug for CompiledPattern
impl Debug for CompiledPattern
Source§impl<'de> Deserialize<'de> for CompiledPattern
impl<'de> Deserialize<'de> for CompiledPattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompiledPattern
impl RefUnwindSafe for CompiledPattern
impl Send for CompiledPattern
impl Sync for CompiledPattern
impl Unpin for CompiledPattern
impl UnsafeUnpin for CompiledPattern
impl UnwindSafe for CompiledPattern
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more