pub struct Pattern {
pub properties: Vec<Property>,
pub predicates: Vec<Predicate>,
pub local: Option<bool>,
pub priority: i32,
/* private fields */
}Expand description
Properties and custom predicates for one query pattern.
Fields§
§properties: Vec<Property>Property settings in runtime order.
predicates: Vec<Predicate>Custom predicates applied after runtime matching.
local: Option<bool>Required local-binding state, or None for either state.
priority: i32Compiled highlight priority, defaulting to 100.
Implementations§
Source§impl Pattern
impl Pattern
Sourcepub fn new(
properties: Vec<Property>,
predicates: Vec<(String, Vec<Argument>)>,
local: Option<bool>,
) -> Result<Self, Error>
pub fn new( properties: Vec<Property>, predicates: Vec<(String, Vec<Argument>)>, local: Option<bool>, ) -> Result<Self, Error>
Compile custom predicates and retain normalized pattern metadata.
§Errors
Returns Error::Query for unsupported or malformed custom predicates.
Auto Trait Implementations§
impl Forget for Pattern
impl Freeze for Pattern
impl Move 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