pub struct ParsedPredicate {
pub kind_predicates: Vec<KindPredicate>,
pub fidelity: Option<FidelityAnnotation>,
}Expand description
Parsed predicate from path suffix
Fields§
§kind_predicates: Vec<KindPredicate>Kind predicates (can be multiple, combined with AND)
fidelity: Option<FidelityAnnotation>Fidelity annotation (optional)
Implementations§
Source§impl ParsedPredicate
impl ParsedPredicate
Sourcepub fn parse(suffix: &str) -> Option<Self>
pub fn parse(suffix: &str) -> Option<Self>
Parse all predicates from a :: suffix string
The suffix can contain multiple predicates separated by :::
::string::outside-comment::yaml:anchor::allow-loss(structural)
Sourcepub fn matches_kind(&self, kind: NodeKind, context: ParsingContext) -> bool
pub fn matches_kind(&self, kind: NodeKind, context: ParsingContext) -> bool
Check if a node matches all kind predicates
Trait Implementations§
Source§impl Clone for ParsedPredicate
impl Clone for ParsedPredicate
Source§fn clone(&self) -> ParsedPredicate
fn clone(&self) -> ParsedPredicate
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 ParsedPredicate
impl Debug for ParsedPredicate
Source§impl Default for ParsedPredicate
impl Default for ParsedPredicate
Source§fn default() -> ParsedPredicate
fn default() -> ParsedPredicate
Returns the “default value” for a type. Read more
Source§impl PartialEq for ParsedPredicate
impl PartialEq for ParsedPredicate
impl Eq for ParsedPredicate
impl StructuralPartialEq for ParsedPredicate
Auto Trait Implementations§
impl Freeze for ParsedPredicate
impl RefUnwindSafe for ParsedPredicate
impl Send for ParsedPredicate
impl Sync for ParsedPredicate
impl Unpin for ParsedPredicate
impl UnwindSafe for ParsedPredicate
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