pub enum Operand {
Integer(u64),
IntegerList(Vec<u64>),
Text(String),
TextList(Vec<String>),
}Expand description
Represents an operand used to filter searches and messages.
Variants§
Implementations§
Source§impl Operand
impl Operand
Sourcepub fn as_integer(&self) -> Result<u64>
pub fn as_integer(&self) -> Result<u64>
Attempts to get the integer variant.
Sourcepub fn integer_list<'c, C: Into<Cow<'c, [u64]>>>(val: C) -> Self
pub fn integer_list<'c, C: Into<Cow<'c, [u64]>>>(val: C) -> Self
Creates a new integer list variant.
Sourcepub fn as_integer_list(&self) -> Result<&[u64]>
pub fn as_integer_list(&self) -> Result<&[u64]>
Attempts to get the integer list variant.
Sourcepub fn text_list<'c, C: Into<Cow<'c, [String]>>>(val: C) -> Self
pub fn text_list<'c, C: Into<Cow<'c, [String]>>>(val: C) -> Self
Creates a new text list variant.
Sourcepub fn as_text_list(&self) -> Result<&[String]>
pub fn as_text_list(&self) -> Result<&[String]>
Attempts to get the text list variant.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operand
impl<'de> Deserialize<'de> for Operand
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
impl Eq for Operand
impl StructuralPartialEq for Operand
Auto Trait Implementations§
impl Freeze for Operand
impl RefUnwindSafe for Operand
impl Send for Operand
impl Sync for Operand
impl Unpin for Operand
impl UnsafeUnpin for Operand
impl UnwindSafe for Operand
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.