pub struct TypedScCall<OriginalResult> {
pub sc_call_step: ScCallStep,
/* private fields */
}
๐Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Expand description
SCCallStep
with explicit return type.
Fieldsยง
ยงsc_call_step: ScCallStep
๐Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Implementationsยง
Sourceยงimpl<OriginalResult> TypedScCall<OriginalResult>
impl<OriginalResult> TypedScCall<OriginalResult>
pub fn result<RequestedResult>(
&self,
) -> Result<RequestedResult, TxResponseStatus>where
OriginalResult: TopEncodeMulti,
RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,
pub fn from<A>(self, address: A) -> Selfwhere
AddressValue: From<A>,
pub fn to<A>(self, address: A) -> Selfwhere
AddressValue: From<A>,
pub fn egld_value<A>(self, amount: A) -> Selfwhere
BigUintValue: From<A>,
pub fn esdt_transfer<T, N, A>( self, token_id: T, token_nonce: N, amount: A, ) -> Self
pub fn function(self, expr: &str) -> Self
pub fn argument<A>(self, expr: A) -> Selfwhere
BytesValue: From<A>,
pub fn gas_limit<V>(self, value: V) -> Self
Sourcepub fn no_expect(self) -> Self
pub fn no_expect(self) -> Self
Explicitly states that no tx expect section should be added and no checks should be performed.
Note: by default a basic TxExpect::ok()
is added, which checks that status is 0 and nothing else.
Sourcepub fn expect_value<ExpectedResult>(
self,
expected_value: ExpectedResult,
) -> Self
pub fn expect_value<ExpectedResult>( self, expected_value: ExpectedResult, ) -> Self
Shorthand for creating a tx expect with status โOkโ and the given value.
The given value is type-checked agains the tx return type.
Sourcepub fn response(&self) -> &TxResponse
pub fn response(&self) -> &TxResponse
Unwraps the response, if available.
Sourceยงimpl<OriginalResult> TypedScCall<OriginalResult>where
OriginalResult: TopEncodeMulti,
impl<OriginalResult> TypedScCall<OriginalResult>where
OriginalResult: TopEncodeMulti,
Sourcepub fn execute<E: TypedScCallExecutor, RequestedResult>(
self,
executor: &mut E,
) -> RequestedResultwhere
RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,
pub fn execute<E: TypedScCallExecutor, RequestedResult>(
self,
executor: &mut E,
) -> RequestedResultwhere
RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,
Executes the operation, on the given executor.
Trait Implementationsยง
Sourceยงimpl<OriginalResult> AsMut<ScCallStep> for TypedScCall<OriginalResult>
impl<OriginalResult> AsMut<ScCallStep> for TypedScCall<OriginalResult>
Sourceยงfn as_mut(&mut self) -> &mut ScCallStep
fn as_mut(&mut self) -> &mut ScCallStep
Converts this type into a mutable reference of the (usually inferred) input type.
Sourceยงimpl<OriginalResult: Debug> Debug for TypedScCall<OriginalResult>
impl<OriginalResult: Debug> Debug for TypedScCall<OriginalResult>
Sourceยงimpl<OriginalResult: Default> Default for TypedScCall<OriginalResult>
impl<OriginalResult: Default> Default for TypedScCall<OriginalResult>
Sourceยงfn default() -> TypedScCall<OriginalResult>
fn default() -> TypedScCall<OriginalResult>
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl<OriginalResult> From<ScCallStep> for TypedScCall<OriginalResult>
impl<OriginalResult> From<ScCallStep> for TypedScCall<OriginalResult>
Sourceยงfn from(untyped: ScCallStep) -> Self
fn from(untyped: ScCallStep) -> Self
Converts to this type from the input type.
Sourceยงimpl<OriginalResult> From<TypedScCall<OriginalResult>> for ScCallStep
impl<OriginalResult> From<TypedScCall<OriginalResult>> for ScCallStep
Sourceยงfn from(typed: TypedScCall<OriginalResult>) -> Self
fn from(typed: TypedScCall<OriginalResult>) -> Self
Converts to this type from the input type.
Auto Trait Implementationsยง
impl<OriginalResult> Freeze for TypedScCall<OriginalResult>
impl<OriginalResult> RefUnwindSafe for TypedScCall<OriginalResult>where
OriginalResult: RefUnwindSafe,
impl<OriginalResult> Send for TypedScCall<OriginalResult>where
OriginalResult: Send,
impl<OriginalResult> Sync for TypedScCall<OriginalResult>where
OriginalResult: Sync,
impl<OriginalResult> Unpin for TypedScCall<OriginalResult>where
OriginalResult: Unpin,
impl<OriginalResult> UnwindSafe for TypedScCall<OriginalResult>where
OriginalResult: UnwindSafe,
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
Sourceยงimpl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more