pub enum ValueOrArray<T> {
Value(T),
Array(Vec<T>),
}
Expand description
Union type for representing a single value or a vector of values inside a filter
Variants§
Implementations§
Source§impl<T> ValueOrArray<T>
impl<T> ValueOrArray<T>
Trait Implementations§
Source§impl<T: Clone> Clone for ValueOrArray<T>
impl<T: Clone> Clone for ValueOrArray<T>
Source§fn clone(&self) -> ValueOrArray<T>
fn clone(&self) -> ValueOrArray<T>
Returns a copy 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<T: Debug> Debug for ValueOrArray<T>
impl<T: Debug> Debug for ValueOrArray<T>
Source§impl<'a, T> Deserialize<'a> for ValueOrArray<T>where
T: DeserializeOwned,
Available on crate feature serde
only.
impl<'a, T> Deserialize<'a> for ValueOrArray<T>where
T: DeserializeOwned,
Available on crate feature
serde
only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T>
impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T>
Source§fn from(src: ValueOrArray<Option<T>>) -> Self
fn from(src: ValueOrArray<Option<T>>) -> Self
Converts to this type from the input type.
Source§impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T>
impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T>
Source§fn from(src: ValueOrArray<T>) -> Self
fn from(src: ValueOrArray<T>) -> Self
Converts to this type from the input type.
Source§impl From<Vec<FixedBytes<32>>> for ValueOrArray<B256>
impl From<Vec<FixedBytes<32>>> for ValueOrArray<B256>
Source§impl<T: Hash> Hash for ValueOrArray<T>
impl<T: Hash> Hash for ValueOrArray<T>
Source§impl<T: PartialEq> PartialEq for ValueOrArray<T>
impl<T: PartialEq> PartialEq for ValueOrArray<T>
Source§impl<T> Serialize for ValueOrArray<T>where
T: Serialize,
Available on crate feature serde
only.
impl<T> Serialize for ValueOrArray<T>where
T: Serialize,
Available on crate feature
serde
only.impl<T: Eq> Eq for ValueOrArray<T>
impl<T> StructuralPartialEq for ValueOrArray<T>
Auto Trait Implementations§
impl<T> Freeze for ValueOrArray<T>where
T: Freeze,
impl<T> RefUnwindSafe for ValueOrArray<T>where
T: RefUnwindSafe,
impl<T> Send for ValueOrArray<T>where
T: Send,
impl<T> Sync for ValueOrArray<T>where
T: Sync,
impl<T> Unpin for ValueOrArray<T>where
T: Unpin,
impl<T> UnwindSafe for ValueOrArray<T>where
T: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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