[][src]Struct muta_protocol::types::ServiceContext

pub struct ServiceContext { /* fields omitted */ }

Methods

impl ServiceContext[src]

pub fn new(params: ServiceContextParams) -> Self[src]

pub fn with_context(
    context: &ServiceContext,
    service_name: String,
    service_method: String,
    service_payload: String
) -> Self
[src]

pub fn get_events(&self) -> Vec<Event>[src]

pub fn sub_cycles(&self, cycles: u64) -> ProtocolResult<()>[src]

pub fn get_cycles_price(&self) -> u64[src]

pub fn get_cycles_limit(&self) -> u64[src]

pub fn get_cycles_used(&self) -> u64[src]

pub fn get_caller(&self) -> Address[src]

pub fn get_current_epoch_id(&self) -> u64[src]

pub fn get_service_name(&self) -> &str[src]

pub fn get_service_method(&self) -> &str[src]

pub fn get_payload(&self) -> &str[src]

pub fn get_timestamp(&self) -> u64[src]

pub fn emit_event(&self, message: String) -> ProtocolResult<()>[src]

Trait Implementations

impl Clone for ServiceContext[src]

impl Debug for ServiceContext[src]

impl PartialEq<ServiceContext> for ServiceContext[src]

impl StructuralPartialEq for ServiceContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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