EventResponse

Struct EventResponse 

Source
pub struct EventResponse {
    pub event_type: EventType,
    pub ledger: u64,
    pub ledger_closed_at: String,
    pub contract_id: String,
    pub id: String,
    pub operation_index: Option<u32>,
    pub transaction_index: Option<u32>,
    pub tx_hash: String,
    pub paging_token: Option<String>,
    pub in_successful_contract_call: bool,
    /* private fields */
}
Expand description

Event data

Fields§

§event_type: EventType

The type of event emission.

§ledger: u64

Sequence number of the ledger in which this event was emitted.

§ledger_closed_at: String

ISO-8601 timestamp of the ledger closing time

§contract_id: String

StrKey representation of the contract address that emitted this event.

§id: String

Unique identifier for this event.

The event’s unique id field is based on a toid from Horizon as used in Horizon’s /effects endpoint.

Specifically, it is a string containing:

  • bigint(32 bit ledger sequence + 20 bit txn number + 12 bit operation) + <hyphen> + number for the event within the operation. For example: 1234-1
§operation_index: Option<u32>

The index of the operation in the transaction

§transaction_index: Option<u32>

The index of the transaction in the ledger

§tx_hash: String

The transaction which triggered this event.

§paging_token: Option<String>

Duplicate of id field, but in the standard place for pagination tokens. Since protocol 23: This field is no longer present

§in_successful_contract_call: bool

If true the event was emitted during a successful contract call.

Deprecated: will be remove in protocol 24

Implementations§

Source§

impl EventResponse

Source

pub fn topic(&self) -> Vec<ScVal>

List containing the topic this event was emitted with.

Source

pub fn value(&self) -> ScVal

The emitted body value of the event (serialized in a base64 string).

Trait Implementations§

Source§

impl Debug for EventResponse

Source§

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

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

impl<'de> Deserialize<'de> for EventResponse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

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<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,