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