Struct psibase::StorageWrapper
source · pub struct StorageWrapper;Expand description
Simplifies calling into the service
Implementations§
source§impl StorageWrapper
impl StorageWrapper
sourcepub const SERVICE: AccountNumber = _
pub const SERVICE: AccountNumber = _
The account this service normally runs on, “example-store”
sourcepub fn call() -> StorageActions<ServiceCaller>
pub fn call() -> StorageActions<ServiceCaller>
Call another service.
This method returns an object which has methods (one per action) which call another service and return the result from the call. This method is only usable by services.
This method defaults sender to crate::get_sender and service to “example-store”.
sourcepub fn call_to(service: AccountNumber) -> StorageActions<ServiceCaller>
pub fn call_to(service: AccountNumber) -> StorageActions<ServiceCaller>
Call another service.
This method returns an object which has methods (one per action) which call another service and return the result from the call. This method is only usable by services.
This method defaults sender to crate::get_sender.
sourcepub fn call_from(sender: AccountNumber) -> StorageActions<ServiceCaller>
pub fn call_from(sender: AccountNumber) -> StorageActions<ServiceCaller>
Call another service.
This method returns an object which has methods (one per action) which call another service and return the result from the call. This method is only usable by services.
This method defaults service to “example-store”.
sourcepub fn call_from_to(
sender: AccountNumber,
service: AccountNumber
) -> StorageActions<ServiceCaller>
pub fn call_from_to( sender: AccountNumber, service: AccountNumber ) -> StorageActions<ServiceCaller>
Call another service.
This method returns an object which has methods (one per action) which call another service and return the result from the call. This method is only usable by services.
sourcepub fn push(chain: &Chain) -> StorageActions<ChainPusher<'_>>
pub fn push(chain: &Chain) -> StorageActions<ChainPusher<'_>>
push transactions to psibase::Chain.
This method returns an object which has methods (one per action) which push transactions to a test chain and return a psibase::ChainResult or psibase::ChainEmptyResult. This final object can verify success or failure and can retrieve the return value, if any.
This method defaults both sender and service to “example-store”.
sourcepub fn push_to(
chain: &Chain,
service: AccountNumber
) -> StorageActions<ChainPusher<'_>>
pub fn push_to( chain: &Chain, service: AccountNumber ) -> StorageActions<ChainPusher<'_>>
push transactions to psibase::Chain.
This method returns an object which has methods (one per action) which push transactions to a test chain and return a psibase::ChainResult or psibase::ChainEmptyResult. This final object can verify success or failure and can retrieve the return value, if any.
This method defaults sender to “example-store”.
sourcepub fn push_from(
chain: &Chain,
sender: AccountNumber
) -> StorageActions<ChainPusher<'_>>
pub fn push_from( chain: &Chain, sender: AccountNumber ) -> StorageActions<ChainPusher<'_>>
push transactions to psibase::Chain.
This method returns an object which has methods (one per action) which push transactions to a test chain and return a psibase::ChainResult or psibase::ChainEmptyResult. This final object can verify success or failure and can retrieve the return value, if any.
This method defaults service to “example-store”.
sourcepub fn push_from_to(
chain: &Chain,
sender: AccountNumber,
service: AccountNumber
) -> StorageActions<ChainPusher<'_>>
pub fn push_from_to( chain: &Chain, sender: AccountNumber, service: AccountNumber ) -> StorageActions<ChainPusher<'_>>
push transactions to psibase::Chain.
This method returns an object which has methods (one per action) which push transactions to a test chain and return a psibase::ChainResult or psibase::ChainEmptyResult. This final object can verify success or failure and can retrieve the return value, if any.
sourcepub fn pack() -> StorageActions<ActionPacker>
pub fn pack() -> StorageActions<ActionPacker>
Pack actions into psibase::Action.
This method returns an object which has methods
(one per action) which pack the action’s arguments using fracpack and
return a psibase::Action. The pack_* series of
functions is mainly useful to applications which push transactions
to blockchains.
This method defaults both sender and service to “example-store”.
sourcepub fn pack_to(service: AccountNumber) -> StorageActions<ActionPacker>
pub fn pack_to(service: AccountNumber) -> StorageActions<ActionPacker>
Pack actions into psibase::Action.
This method returns an object which has methods
(one per action) which pack the action’s arguments using fracpack and
return a psibase::Action. The pack_* series of
functions is mainly useful to applications which push transactions
to blockchains.
This method defaults sender to “example-store”.
sourcepub fn pack_from(sender: AccountNumber) -> StorageActions<ActionPacker>
pub fn pack_from(sender: AccountNumber) -> StorageActions<ActionPacker>
Pack actions into psibase::Action.
This method returns an object which has methods
(one per action) which pack the action’s arguments using fracpack and
return a psibase::Action. The pack_* series of
functions is mainly useful to applications which push transactions
to blockchains.
This method defaults service to “example-store”.
sourcepub fn pack_from_to(
sender: AccountNumber,
service: AccountNumber
) -> StorageActions<ActionPacker>
pub fn pack_from_to( sender: AccountNumber, service: AccountNumber ) -> StorageActions<ActionPacker>
Pack actions into psibase::Action.
This method returns an object which has methods
(one per action) which pack the action’s arguments using fracpack and
return a psibase::Action. The pack_* series of
functions is mainly useful to applications which push transactions
to blockchains.
Trait Implementations§
source§impl Clone for StorageWrapper
impl Clone for StorageWrapper
source§fn clone(&self) -> StorageWrapper
fn clone(&self) -> StorageWrapper
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more