pub struct PatternRegistry { /* private fields */ }Expand description
Resolver from YAML names → concrete pattern-component impls.
Implementations§
Source§impl PatternRegistry
impl PatternRegistry
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Registry pre-populated with Allora’s built-in strategies:
allora.concat_text, allora.json_array, allora.emit_signal.
pub fn register_completion<N: Into<String>>( &mut self, name: N, impl_: Arc<dyn CompletionCondition>, )
pub fn register_strategy<N: Into<String>>( &mut self, name: N, impl_: Arc<dyn AggregationStrategy>, )
pub fn register_store<N: Into<String>>( &mut self, name: N, impl_: Arc<dyn GroupStore>, )
pub fn completion(&self, name: &str) -> Option<Arc<dyn CompletionCondition>>
pub fn strategy(&self, name: &str) -> Option<Arc<dyn AggregationStrategy>>
pub fn store(&self, name: &str) -> Option<Arc<dyn GroupStore>>
pub fn completion_names(&self) -> Vec<&str>
pub fn strategy_names(&self) -> Vec<&str>
pub fn store_names(&self) -> Vec<&str>
Trait Implementations§
Source§impl Clone for PatternRegistry
impl Clone for PatternRegistry
Source§fn clone(&self) -> PatternRegistry
fn clone(&self) -> PatternRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for PatternRegistry
impl Default for PatternRegistry
Source§fn default() -> PatternRegistry
fn default() -> PatternRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PatternRegistry
impl !RefUnwindSafe for PatternRegistry
impl Send for PatternRegistry
impl Sync for PatternRegistry
impl Unpin for PatternRegistry
impl UnsafeUnpin for PatternRegistry
impl !UnwindSafe for PatternRegistry
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