Struct sc_rpc::offchain::Offchain[][src]

pub struct Offchain<T: OffchainStorage> { /* fields omitted */ }

Offchain API

Implementations

impl<T: OffchainStorage> Offchain<T>[src]

pub fn new(storage: T, deny_unsafe: DenyUnsafe) -> Self[src]

Create new instance of Offchain API.

Trait Implementations

impl<T: Debug + OffchainStorage> Debug for Offchain<T>[src]

impl<T: OffchainStorage + 'static> OffchainApi for Offchain<T>[src]

fn set_local_storage(
    &self,
    kind: StorageKind,
    key: Bytes,
    value: Bytes
) -> Result<()>
[src]

Set offchain local storage under given key and prefix.

fn get_local_storage(
    &self,
    kind: StorageKind,
    key: Bytes
) -> Result<Option<Bytes>>
[src]

Get offchain local storage under given key and prefix.

Auto Trait Implementations

impl<T> !RefUnwindSafe for Offchain<T>[src]

impl<T> Send for Offchain<T>[src]

impl<T> Sync for Offchain<T>[src]

impl<T> Unpin for Offchain<T>[src]

impl<T> !UnwindSafe for Offchain<T>[src]

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> CheckedConversion for T[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeDebug for T where
    T: Debug

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

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<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded

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