pub struct CustomFilters { /* private fields */ }
Expand description
Custom filters
base on embedded scripting language Rhai
Implementations§
Source§impl CustomFilters
impl CustomFilters
Sourcepub fn new(
block_filter_str: Option<&str>,
cell_filter_str: Option<&str>,
) -> Self
pub fn new( block_filter_str: Option<&str>, cell_filter_str: Option<&str>, ) -> Self
Construct new CustomFilters
Sourcepub fn from_filters(block_filter: Option<AST>, cell_filter: Option<AST>) -> Self
pub fn from_filters(block_filter: Option<AST>, cell_filter: Option<AST>) -> Self
Construct new CustomFilters
Sourcepub fn is_block_filter_match(&self, block: &BlockView) -> bool
pub fn is_block_filter_match(&self, block: &BlockView) -> bool
Returns true if the block filter is match
Sourcepub fn is_cell_filter_match(
&self,
output: &CellOutput,
output_data: &Bytes,
) -> bool
pub fn is_cell_filter_match( &self, output: &CellOutput, output_data: &Bytes, ) -> bool
Returns true if the cell filter is match
Sourcepub fn is_cell_filter_enabled(&self) -> bool
pub fn is_cell_filter_enabled(&self) -> bool
check cell filter enabled
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CustomFilters
impl !RefUnwindSafe for CustomFilters
impl Send for CustomFilters
impl Sync for CustomFilters
impl Unpin for CustomFilters
impl !UnwindSafe for CustomFilters
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more