Struct pallet_contracts_rpc::gen_client::Client [−][src]
pub struct Client<BlockHash, BlockNumber, AccountId, Balance, Hash> { /* fields omitted */ }
Expand description
The Client.
Implementations
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> Client<BlockHash, BlockNumber, AccountId, Balance, Hash> where
BlockHash: Send + Sync + 'static + Serialize,
BlockNumber: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned + Serialize,
Balance: Send + Sync + 'static,
Hash: Send + Sync + 'static + Serialize,
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> Client<BlockHash, BlockNumber, AccountId, Balance, Hash> where
BlockHash: Send + Sync + 'static + Serialize,
BlockNumber: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned + Serialize,
Balance: Send + Sync + 'static,
Hash: Send + Sync + 'static + Serialize,
pub fn call(
&self,
call_request: CallRequest<AccountId>,
at: Option<BlockHash>
) -> impl Future<Item = ContractExecResult, Error = RpcError>
pub fn call(
&self,
call_request: CallRequest<AccountId>,
at: Option<BlockHash>
) -> impl Future<Item = ContractExecResult, Error = RpcError>
Executes a call to a contract.
This call is performed locally without submitting any transactions. Thus executing this won’t change any state. Nonetheless, the calling state-changing contracts is still possible.
This method is useful for calling getter-like methods on contracts.
pub fn instantiate(
&self,
instantiate_request: InstantiateRequest<AccountId, Hash>,
at: Option<BlockHash>
) -> impl Future<Item = ContractInstantiateResult<AccountId, BlockNumber>, Error = RpcError>
pub fn instantiate(
&self,
instantiate_request: InstantiateRequest<AccountId, Hash>,
at: Option<BlockHash>
) -> impl Future<Item = ContractInstantiateResult<AccountId, BlockNumber>, Error = RpcError>
Instantiate a new contract.
This call is performed locally without submitting any transactions. Thus the contract is not actually created.
This method is useful for UIs to dry-run contract instantiations.
Returns the value under a specified storage key
in a contract given by address
param,
or None
if it is not set.
pub fn rent_projection(
&self,
address: AccountId,
at: Option<BlockHash>
) -> impl Future<Item = Option<BlockNumber>, Error = RpcError>
pub fn rent_projection(
&self,
address: AccountId,
at: Option<BlockHash>
) -> impl Future<Item = Option<BlockNumber>, Error = RpcError>
Returns the projected time a given contract will be able to sustain paying its rent.
The returned projection is relevant for the given block, i.e. it is as if the contract was accessed at the beginning of that block.
Returns None
if the contract is exempted from rent.
Trait Implementations
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> From<RpcChannel> for Client<BlockHash, BlockNumber, AccountId, Balance, Hash> where
BlockHash: Send + Sync + 'static + Serialize,
BlockNumber: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned + Serialize,
Balance: Send + Sync + 'static,
Hash: Send + Sync + 'static + Serialize,
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> From<RpcChannel> for Client<BlockHash, BlockNumber, AccountId, Balance, Hash> where
BlockHash: Send + Sync + 'static + Serialize,
BlockNumber: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned + Serialize,
Balance: Send + Sync + 'static,
Hash: Send + Sync + 'static + Serialize,
Auto Trait Implementations
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> !RefUnwindSafe for Client<BlockHash, BlockNumber, AccountId, Balance, Hash>
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> Send for Client<BlockHash, BlockNumber, AccountId, Balance, Hash> where
AccountId: Send,
Balance: Send,
BlockHash: Send,
BlockNumber: Send,
Hash: Send,
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> Sync for Client<BlockHash, BlockNumber, AccountId, Balance, Hash> where
AccountId: Sync,
Balance: Sync,
BlockHash: Sync,
BlockNumber: Sync,
Hash: Sync,
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> Unpin for Client<BlockHash, BlockNumber, AccountId, Balance, Hash> where
AccountId: Unpin,
Balance: Unpin,
BlockHash: Unpin,
BlockNumber: Unpin,
Hash: Unpin,
impl<BlockHash, BlockNumber, AccountId, Balance, Hash> !UnwindSafe for Client<BlockHash, BlockNumber, AccountId, Balance, Hash>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V