Struct SabreTransactionContext

Source
pub struct SabreTransactionContext {}

Implementations§

Trait Implementations§

Source§

impl Default for SabreTransactionContext

Source§

fn default() -> SabreTransactionContext

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

impl TransactionContext for SabreTransactionContext

Source§

fn get_state_entries( &self, addresses: &[String], ) -> Result<Vec<(String, Vec<u8>)>, WasmSdkError>

get_state_entries queries the validator state for data at each of the addresses in the given list. The addresses that have been set are returned. Read more
Source§

fn set_state_entries( &self, entries: Vec<(String, Vec<u8>)>, ) -> Result<(), WasmSdkError>

set_state_entries requests that each address in the provided map be set in validator state to its corresponding value. Read more
Source§

fn delete_state_entries( &self, addresses: &[String], ) -> Result<Vec<String>, WasmSdkError>

delete_state_entries requests that each of the provided addresses be unset in validator state. A list of successfully deleted addresses is returned. Read more
Source§

fn add_event( &self, event_type: String, attributes: Vec<(String, String)>, data: &[u8], ) -> Result<(), WasmSdkError>

add_event adds a new event to the execution result for this transaction. Read more
Source§

fn get_state( &self, addresses: &[String], ) -> Result<Vec<(String, Vec<u8>)>, WasmSdkError>

👎Deprecated since 0.2.0: please use get_state_entry or get_state_entries instead
get_state queries the validator state for data at each of the addresses in the given list. The addresses that have been set are returned. get_state is deprecated, please use get_state_entry or get_state_entries instead Read more
Source§

fn get_state_entry( &self, address: &str, ) -> Result<Option<Vec<u8>>, WasmSdkError>

get_state_entry queries the validator state for data at the address given. If the address is set, the data is returned. Read more
Source§

fn set_state( &self, entries: HashMap<String, Vec<u8>>, ) -> Result<(), WasmSdkError>

👎Deprecated since 0.2.0: please use set_state_entry or set_state_entries instead
set_state requests that each address in the provided map be set in validator state to its corresponding value. set_state is deprecated, please use set_state_entry to set_state_entries instead Read more
Source§

fn set_state_entry( &self, address: String, data: Vec<u8>, ) -> Result<(), WasmSdkError>

set_state_entry requests that the provided address is set in the validator state to its corresponding value. Read more
Source§

fn delete_state( &self, addresses: &[String], ) -> Result<Vec<String>, WasmSdkError>

👎Deprecated since 0.2.0: please use delete_state_entry or delete_state_entries instead
delete_state requests that each of the provided addresses be unset in validator state. A list of successfully deleted addresses is returned. delete_state is deprecated, please use delete_state_entry to delete_state_entries instead Read more
Source§

fn delete_state_entry( &self, address: &str, ) -> Result<Option<String>, WasmSdkError>

delete_state_entry requests that the provided address be unset in validator state. A list of successfully deleted addresses is returned. 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, 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> SafeBorrow<T> for T
where T: ?Sized,

Source§

fn borrow_replacement(ptr: &T) -> &T

Given ptr, which was obtained from a prior call to Self::borrow(), return a value with the same nominal lifetime which is guaranteed to survive mutations to Self. Read more
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V