pub struct ContractCall<R> { /* private fields */ }Expand description
A typed state-changing contract call, prepared but not yet submitted.
Built by Contract::prepare_call, and the natural return type of a typed
client’s call methods. Awaiting it submits the call, requires successful
execution, and decodes the return as R. To see the receipt as well, use
with_receipt; to submit without waiting, use
submit.
Implementations§
Source§impl<R> ContractCall<R>
impl<R> ContractCall<R>
Sourcepub async fn submit(self) -> Result<SubmittedContractCall>
pub async fn submit(self) -> Result<SubmittedContractCall>
Submit the call without waiting for its receipt.
Sourcepub async fn receipt(self) -> Result<TransactionReceipt>
pub async fn receipt(self) -> Result<TransactionReceipt>
Submit the call and await its receipt, requiring successful execution but ignoring the return value.
Source§impl<R> ContractCall<R>where
R: for<'r> ReadXDR<'r>,
impl<R> ContractCall<R>where
R: for<'r> ReadXDR<'r>,
Sourcepub async fn with_receipt(self) -> Result<(R, TransactionReceipt)>
pub async fn with_receipt(self) -> Result<(R, TransactionReceipt)>
Submit the call, require successful execution, and return the decoded return value together with the receipt (for its events or gas).
Trait Implementations§
Source§impl<R> Debug for ContractCall<R>
impl<R> Debug for ContractCall<R>
Source§impl<R> IntoFuture for ContractCall<R>
impl<R> IntoFuture for ContractCall<R>
Source§type Output = Result<R, TestkitError>
type Output = Result<R, TestkitError>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = Result<R, TestkitError>> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = Result<R, TestkitError>> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<R> !RefUnwindSafe for ContractCall<R>
impl<R> !UnwindSafe for ContractCall<R>
impl<R> Freeze for ContractCall<R>
impl<R> Send for ContractCall<R>
impl<R> Sync for ContractCall<R>
impl<R> Unpin for ContractCall<R>
impl<R> UnsafeUnpin for ContractCall<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more