Struct novax_executor::TypedScQuery
source · pub struct TypedScQuery<OriginalResult> {
pub sc_query_step: ScQueryStep,
/* private fields */
}Fields§
§sc_query_step: ScQueryStepImplementations§
source§impl<OriginalResult> TypedScQuery<OriginalResult>
impl<OriginalResult> TypedScQuery<OriginalResult>
pub fn function(self, expr: &str) -> TypedScQuery<OriginalResult>
pub fn argument<A>(self, expr: A) -> TypedScQuery<OriginalResult>where
BytesValue: From<A>,
pub fn to<A>(self, address: A) -> TypedScQuery<OriginalResult>where
AddressValue: From<A>,
sourcepub fn expect(self, expect: TxExpect) -> TypedScQuery<OriginalResult>
pub fn expect(self, expect: TxExpect) -> TypedScQuery<OriginalResult>
Adds a custom expect section to the tx.
sourcepub fn no_expect(self) -> TypedScQuery<OriginalResult>
pub fn no_expect(self) -> TypedScQuery<OriginalResult>
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,
) -> TypedScQuery<OriginalResult>
pub fn expect_value<ExpectedResult>( self, expected_value: ExpectedResult, ) -> TypedScQuery<OriginalResult>
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> TypedScQuery<OriginalResult>where
OriginalResult: TopEncodeMulti,
impl<OriginalResult> TypedScQuery<OriginalResult>where
OriginalResult: TopEncodeMulti,
Trait Implementations§
source§impl<OriginalResult> AsMut<ScQueryStep> for TypedScQuery<OriginalResult>
impl<OriginalResult> AsMut<ScQueryStep> for TypedScQuery<OriginalResult>
source§fn as_mut(&mut self) -> &mut ScQueryStep
fn as_mut(&mut self) -> &mut ScQueryStep
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl<OriginalResult> Debug for TypedScQuery<OriginalResult>where
OriginalResult: Debug,
impl<OriginalResult> Debug for TypedScQuery<OriginalResult>where
OriginalResult: Debug,
source§impl<OriginalResult> Default for TypedScQuery<OriginalResult>where
OriginalResult: Default,
impl<OriginalResult> Default for TypedScQuery<OriginalResult>where
OriginalResult: Default,
source§fn default() -> TypedScQuery<OriginalResult>
fn default() -> TypedScQuery<OriginalResult>
Returns the “default value” for a type. Read more
source§impl<OriginalResult> From<ScQueryStep> for TypedScQuery<OriginalResult>
impl<OriginalResult> From<ScQueryStep> for TypedScQuery<OriginalResult>
source§fn from(untyped: ScQueryStep) -> TypedScQuery<OriginalResult>
fn from(untyped: ScQueryStep) -> TypedScQuery<OriginalResult>
Converts to this type from the input type.
source§impl<OriginalResult> From<TypedScQuery<OriginalResult>> for ScQueryStep
impl<OriginalResult> From<TypedScQuery<OriginalResult>> for ScQueryStep
source§fn from(typed: TypedScQuery<OriginalResult>) -> ScQueryStep
fn from(typed: TypedScQuery<OriginalResult>) -> ScQueryStep
Converts to this type from the input type.
Auto Trait Implementations§
impl<OriginalResult> Freeze for TypedScQuery<OriginalResult>
impl<OriginalResult> RefUnwindSafe for TypedScQuery<OriginalResult>where
OriginalResult: RefUnwindSafe,
impl<OriginalResult> Send for TypedScQuery<OriginalResult>where
OriginalResult: Send,
impl<OriginalResult> Sync for TypedScQuery<OriginalResult>where
OriginalResult: Sync,
impl<OriginalResult> Unpin for TypedScQuery<OriginalResult>where
OriginalResult: Unpin,
impl<OriginalResult> UnwindSafe for TypedScQuery<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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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