pub struct Filter { /* private fields */ }Implementations§
Source§impl Filter
impl Filter
pub fn new<P>(p: P) -> Filter
Sourcepub fn with_error<P, S>(p: P, msg: S) -> Filter
pub fn with_error<P, S>(p: P, msg: S) -> Filter
Create a filter with a custom rejection error message.
pub fn id(&self) -> &str
pub fn accepts(&self, exchange: &Exchange) -> bool
Sourcepub fn from_apl(apl: &str) -> Result<Filter, Error>
pub fn from_apl(apl: &str) -> Result<Filter, Error>
Build a filter from an APL (Allora Predicate Language) expression string (v1).
See module docs for supported atoms & operators; returns Error::Serialization on structural issues.
Unknown atom formats degrade to literal body equality.
pub fn from_apl_with_id(id: Option<String>, apl: &str) -> Result<Filter, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Filter
impl !RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl !UnwindSafe for Filter
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