EthEvent

Trait EthEvent 

Source
pub trait EthEvent:
    Detokenize
    + Send
    + Sync {
    // Required methods
    fn name() -> Cow<'static, str>;
    fn signature() -> H256;
    fn abi_signature() -> Cow<'static, str>;
    fn decode_log(log: &RawLog) -> Result<Self, Error>
       where Self: Sized;
    fn is_anonymous() -> bool;

    // Provided method
    fn new<B, M>(filter: Filter, provider: B) -> Event<B, M, Self>
       where Self: Sized,
             B: Borrow<M>,
             M: Middleware { ... }
}
Expand description

A trait for implementing event bindings

Required Methods§

Source

fn name() -> Cow<'static, str>

The name of the event this type represents

Source

fn signature() -> H256

Retrieves the signature for the event this data corresponds to. This signature is the Keccak-256 hash of the ABI signature of this event.

Source

fn abi_signature() -> Cow<'static, str>

Retrieves the ABI signature for the event this data corresponds to.

Source

fn decode_log(log: &RawLog) -> Result<Self, Error>
where Self: Sized,

Decodes an Ethereum RawLog into an instance of the type.

Source

fn is_anonymous() -> bool

Returns true if this is an anonymous event

Provided Methods§

Source

fn new<B, M>(filter: Filter, provider: B) -> Event<B, M, Self>
where Self: Sized, B: Borrow<M>, M: Middleware,

Returns an Event builder for the ethereum event represented by this types ABI signature.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§