pub struct RegexPattern { /* private fields */ }Expand description
A validated regex, carrying both the source pattern and the compiled automaton.
Equality and hashing use the source string (the compiled automaton has no stable representation). Serde emits the source string and recompiles on deserialisation — the only place in paramodel where deserialisation can fail due to payload validity.
Implementations§
Trait Implementations§
Source§impl Clone for RegexPattern
impl Clone for RegexPattern
Source§fn clone(&self) -> RegexPattern
fn clone(&self) -> RegexPattern
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 RegexPattern
impl Debug for RegexPattern
Source§impl<'de> Deserialize<'de> for RegexPattern
impl<'de> Deserialize<'de> for RegexPattern
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for RegexPattern
impl Hash for RegexPattern
Source§impl PartialEq for RegexPattern
impl PartialEq for RegexPattern
Source§impl Serialize for RegexPattern
impl Serialize for RegexPattern
impl Eq for RegexPattern
Auto Trait Implementations§
impl Freeze for RegexPattern
impl RefUnwindSafe for RegexPattern
impl Send for RegexPattern
impl Sync for RegexPattern
impl Unpin for RegexPattern
impl UnsafeUnpin for RegexPattern
impl UnwindSafe for RegexPattern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.