pub enum ValueOrArray<T> {
Value(T),
Array(Vec<T>),
}
Available on crate feature
eth
only.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 for ValueOrArray<T>where
T: Clone,
impl<T> Clone for ValueOrArray<T>where
T: Clone,
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 for ValueOrArray<T>where
T: Debug,
impl<T> Debug for ValueOrArray<T>where
T: Debug,
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<ValueOrArray<T>, <D as Deserializer<'a>>::Error>where
D: Deserializer<'a>,
fn deserialize<D>(
deserializer: D,
) -> Result<ValueOrArray<T>, <D as Deserializer<'a>>::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T> From<ValueOrArray<T>> for FilterSet<T>
impl<T> From<ValueOrArray<T>> for FilterSet<T>
source§fn from(src: ValueOrArray<T>) -> FilterSet<T>
fn from(src: ValueOrArray<T>) -> FilterSet<T>
Converts to this type from the input type.
source§impl From<Vec<FixedBytes<32>>> for ValueOrArray<FixedBytes<32>>
impl From<Vec<FixedBytes<32>>> for ValueOrArray<FixedBytes<32>>
source§fn from(src: Vec<FixedBytes<32>>) -> ValueOrArray<FixedBytes<32>>
fn from(src: Vec<FixedBytes<32>>) -> ValueOrArray<FixedBytes<32>>
Converts to this type from the input type.
source§impl<T> Hash for ValueOrArray<T>where
T: Hash,
impl<T> Hash for ValueOrArray<T>where
T: Hash,
source§impl<T> PartialEq for ValueOrArray<T>where
T: PartialEq,
impl<T> PartialEq for ValueOrArray<T>where
T: PartialEq,
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.source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Eq for ValueOrArray<T>where
T: Eq,
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