pub struct FilterContext { /* private fields */ }Implementations§
Source§impl FilterContext
impl FilterContext
pub fn new() -> Self
Sourcepub fn set_by_id(&mut self, field_id: usize, value: LiteralValue)
pub fn set_by_id(&mut self, field_id: usize, value: LiteralValue)
Set a field value by field ID.
Sourcepub fn get_by_id(&self, field_id: usize) -> Option<&LiteralValue>
pub fn get_by_id(&self, field_id: usize) -> Option<&LiteralValue>
Get a field value by field ID.
pub fn set( &mut self, field: &str, value: LiteralValue, schema: &FilterSchema, ) -> Result<(), WirerustError>
pub fn get(&self, field: &str, schema: &FilterSchema) -> Option<&LiteralValue>
pub fn set_int( &mut self, field: &str, value: i64, schema: &FilterSchema, ) -> &mut Self
pub fn set_bool( &mut self, field: &str, value: bool, schema: &FilterSchema, ) -> &mut Self
pub fn set_ip( &mut self, field: &str, value: IpAddr, schema: &FilterSchema, ) -> &mut Self
pub fn set_bytes<T: AsRef<[u8]>>( &mut self, field: &str, value: T, schema: &FilterSchema, ) -> &mut Self
pub fn set_array( &mut self, field: &str, value: Vec<LiteralValue>, schema: &FilterSchema, ) -> &mut Self
pub fn get_int(&self, field: &str, schema: &FilterSchema) -> Option<i64>
pub fn get_bool(&self, field: &str, schema: &FilterSchema) -> Option<bool>
pub fn get_ip(&self, field: &str, schema: &FilterSchema) -> Option<IpAddr>
pub fn get_bytes(&self, field: &str, schema: &FilterSchema) -> Option<&[u8]>
pub fn get_array( &self, field: &str, schema: &FilterSchema, ) -> Option<Arc<Vec<LiteralValue>>>
Trait Implementations§
Source§impl Clone for FilterContext
impl Clone for FilterContext
Source§fn clone(&self) -> FilterContext
fn clone(&self) -> FilterContext
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 FilterContext
impl Debug for FilterContext
Source§impl Default for FilterContext
impl Default for FilterContext
Source§fn default() -> FilterContext
fn default() -> FilterContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FilterContext
impl<'de> Deserialize<'de> for FilterContext
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 FilterContext
impl RefUnwindSafe for FilterContext
impl Send for FilterContext
impl Sync for FilterContext
impl Unpin for FilterContext
impl UnwindSafe for FilterContext
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