Enum ethers_core::abi::Topic

source ·
pub enum Topic<T> {
    Any,
    OneOf(Vec<T>),
    This(T),
}
Expand description

Acceptable topic possibilities.

Variants§

§

Any

Match any.

§

OneOf(Vec<T>)

Match any of the hashes.

§

This(T)

Match only this hash.

Implementations§

source§

impl<T> Topic<T>

source

pub fn map<F, O>(self, f: F) -> Topic<O>
where F: Fn(T) -> O,

Map

source

pub fn is_any(&self) -> bool

Returns true if topic is empty (Topic::Any)

Trait Implementations§

source§

impl<T> Debug for Topic<T>
where T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<T> Default for Topic<T>

source§

fn default() -> Topic<T>

Returns the “default value” for a type. Read more
source§

impl<T> From<Option<T>> for Topic<T>

source§

fn from(o: Option<T>) -> Topic<T>

Converts to this type from the input type.
source§

impl<T> From<T> for Topic<T>

source§

fn from(topic: T) -> Topic<T>

Converts to this type from the input type.
source§

impl<T> From<Topic<T>> for Vec<T>

source§

fn from(topic: Topic<T>) -> Vec<T>

Converts to this type from the input type.
source§

impl<T> From<Vec<T>> for Topic<T>

source§

fn from(topics: Vec<T>) -> Topic<T>

Converts to this type from the input type.
source§

impl<T> Index<usize> for Topic<T>

§

type Output = T

The returned type after indexing.
source§

fn index(&self, index: usize) -> &<Topic<T> as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T> PartialEq for Topic<T>
where T: PartialEq,

source§

fn eq(&self, other: &Topic<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Topic<H256>

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,

Serialize this value into the given Serde serializer. Read more
source§

impl<T> Eq for Topic<T>
where T: Eq,

source§

impl<T> StructuralPartialEq for Topic<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Topic<T>
where T: RefUnwindSafe,

§

impl<T> Send for Topic<T>
where T: Send,

§

impl<T> Sync for Topic<T>
where T: Sync,

§

impl<T> Unpin for Topic<T>
where T: Unpin,

§

impl<T> UnwindSafe for Topic<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> JsonSchemaMaybe for T