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 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<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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.