pub struct Pattern { /* private fields */ }Implementations§
Source§impl Pattern
impl Pattern
pub fn new( name: impl Into<String>, namespace: impl Into<String>, regex: impl Into<String>, ) -> Result<Self, String>
pub fn id(&self) -> &ConceptId
pub fn name(&self) -> &str
pub fn namespace(&self) -> &str
pub fn regex(&self) -> &str
pub fn is_match(&self, candidate: &str) -> Result<bool, String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pattern
impl<'de> Deserialize<'de> for Pattern
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 Pattern
impl Forget for Pattern
impl Move for Pattern
impl RefUnwindSafe for Patternwhere
OnceCell<Regex>: RefUnwindSafe,
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnsafeUnpin for Patternwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
Align8<*mut Waiter>: UnsafeUnpin,
*const ArcInner<RegexI> is !null: UnsafeUnpin,
PhantomData<ArcInner<RegexI>>: UnsafeUnpin,
*const Pool<Cache, Box<dyn Fn() -> Cache + UnwindSafe + RefUnwindSafe + Send + Sync>> is !null: UnsafeUnpin,
PhantomData<Pool<Cache, Box<dyn Fn() -> Cache + UnwindSafe + RefUnwindSafe + Send + Sync>>>: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
impl UnwindSafe for Pattern
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