pub struct Pattern { /* private fields */ }Expand description
A parsed resource pattern.
Implementations§
Source§impl Pattern
impl Pattern
Sourcepub fn parse(resource: &str) -> Self
pub fn parse(resource: &str) -> Self
Parse a resource string into a pattern.
Never fails: anything outside the decidable fragment is recorded as
such and surfaces later as Tri::Unknown.
Sourcepub fn is_decidable(&self) -> bool
pub fn is_decidable(&self) -> bool
Whether this pattern lies inside the decidable fragment.
Sourcepub fn undecidable_reason(&self) -> Option<Undecidable>
pub fn undecidable_reason(&self) -> Option<Undecidable>
Why this pattern could not be decided, if it could not.
A refusal has to be actionable. “These grants could not be compared” is
not; “*.rs is a partial-segment glob, which the solver does not
decide” tells the author exactly what to change.
Trait Implementations§
impl Eq for Pattern
impl StructuralPartialEq for Pattern
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnsafeUnpin for Pattern
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