pub struct CompositeRegistry { /* private fields */ }Expand description
A registry of composite predicates for lookup and expansion.
Implementations§
Source§impl CompositeRegistry
impl CompositeRegistry
Sourcepub fn register(
&mut self,
predicate: CompositePredicate,
) -> Result<(), AdapterError>
pub fn register( &mut self, predicate: CompositePredicate, ) -> Result<(), AdapterError>
Registers a composite predicate.
Sourcepub fn get(&self, name: &str) -> Option<&CompositePredicate>
pub fn get(&self, name: &str) -> Option<&CompositePredicate>
Gets a composite predicate by name.
Sourcepub fn expand(
&self,
name: &str,
args: &[String],
) -> Result<PredicateBody, AdapterError>
pub fn expand( &self, name: &str, args: &[String], ) -> Result<PredicateBody, AdapterError>
Expands a composite predicate with the given arguments.
Sourcepub fn list_predicates(&self) -> Vec<String>
pub fn list_predicates(&self) -> Vec<String>
Lists all registered predicate names.
Trait Implementations§
Source§impl Clone for CompositeRegistry
impl Clone for CompositeRegistry
Source§fn clone(&self) -> CompositeRegistry
fn clone(&self) -> CompositeRegistry
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 CompositeRegistry
impl Debug for CompositeRegistry
Source§impl Default for CompositeRegistry
impl Default for CompositeRegistry
Source§fn default() -> CompositeRegistry
fn default() -> CompositeRegistry
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CompositeRegistry
impl<'de> Deserialize<'de> for CompositeRegistry
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 CompositeRegistry
impl RefUnwindSafe for CompositeRegistry
impl Send for CompositeRegistry
impl Sync for CompositeRegistry
impl Unpin for CompositeRegistry
impl UnwindSafe for CompositeRegistry
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