pub struct SessionStrParams<'a> { /* private fields */ }Expand description
Container for session-related arguments used while constructing a Deploy.
§session_args_simple
For methods taking session_args_simple, this parameter is the session contract arguments, in
the form <NAME:TYPE='VALUE'> or <NAME:TYPE=null>.
There are further details in
the docs for the equivalent
payment_args_simple.
§session_args_json
For methods taking session_args_json, this parameter is the session contract arguments, as a
JSON-encoded Array of JSON Objects of the form:
[{"name":<String>,"type":<VALUE>,"value":<VALUE>}]There are further details in
the docs for the equivalent payment_args_json.
§session_args_complex
For methods taking session_args_complex, this parameter is the session contract arguments, in
the form of a ToBytes-encoded file.
Note while multiple session args can be specified for a single session code instance, only
one of session_args_simple, session_args_json or session_args_complex may be used.
Implementations§
Source§impl<'a> SessionStrParams<'a>
impl<'a> SessionStrParams<'a>
Sourcepub fn with_path(
session_path: &'a str,
session_args_simple: Vec<&'a str>,
session_args_json: &'a str,
session_args_complex: &'a str,
) -> Self
pub fn with_path( session_path: &'a str, session_args_simple: Vec<&'a str>, session_args_json: &'a str, session_args_complex: &'a str, ) -> Self
Constructs a SessionStrParams using a session smart contract file.
session_pathis the path to the compiled Wasm session code.- See the struct docs for a description of
session_args_simple,session_args_jsonandsession_args_complex.
Sourcepub fn with_name(
session_name: &'a str,
session_entry_point: &'a str,
session_args_simple: Vec<&'a str>,
session_args_json: &'a str,
session_args_complex: &'a str,
) -> Self
pub fn with_name( session_name: &'a str, session_entry_point: &'a str, session_args_simple: Vec<&'a str>, session_args_json: &'a str, session_args_complex: &'a str, ) -> Self
Constructs a SessionStrParams using a stored contract’s name.
session_nameis the name of the stored contract (associated with the executing account) to be called as the session.session_entry_pointis the name of the method that will be used when calling the session contract.- See the struct docs for a description of
session_args_simple,session_args_jsonandsession_args_complex.
Sourcepub fn with_hash(
session_hash: &'a str,
session_entry_point: &'a str,
session_args_simple: Vec<&'a str>,
session_args_json: &'a str,
session_args_complex: &'a str,
) -> Self
pub fn with_hash( session_hash: &'a str, session_entry_point: &'a str, session_args_simple: Vec<&'a str>, session_args_json: &'a str, session_args_complex: &'a str, ) -> Self
Constructs a SessionStrParams using a stored contract’s hex-encoded hash.
session_hashis the hex-encoded hash of the stored contract to be called as the session.session_entry_pointis the name of the method that will be used when calling the session contract.- See the struct docs for a description of
session_args_simple,session_args_jsonandsession_args_complex.
Sourcepub fn with_package_name(
session_package_name: &'a str,
session_version: &'a str,
session_entry_point: &'a str,
session_args_simple: Vec<&'a str>,
session_args_json: &'a str,
session_args_complex: &'a str,
) -> Self
pub fn with_package_name( session_package_name: &'a str, session_version: &'a str, session_entry_point: &'a str, session_args_simple: Vec<&'a str>, session_args_json: &'a str, session_args_complex: &'a str, ) -> Self
Constructs a SessionStrParams using a stored contract’s package name.
session_package_nameis the name of the stored package to be called as the session.session_versionis the version of the called session contract. The latest will be used ifsession_versionis empty.session_entry_pointis the name of the method that will be used when calling the session contract.- See the struct docs for a description of
session_args_simple,session_args_jsonandsession_args_complex.
Sourcepub fn with_package_hash(
session_package_hash: &'a str,
session_version: &'a str,
session_entry_point: &'a str,
session_args_simple: Vec<&'a str>,
session_args_json: &'a str,
session_args_complex: &'a str,
) -> Self
pub fn with_package_hash( session_package_hash: &'a str, session_version: &'a str, session_entry_point: &'a str, session_args_simple: Vec<&'a str>, session_args_json: &'a str, session_args_complex: &'a str, ) -> Self
Constructs a SessionStrParams using a stored contract’s package hash.
session_package_hashis the hex-encoded hash of the stored package to be called as the session.session_versionis the version of the called session contract. The latest will be used ifsession_versionis empty.session_entry_pointis the name of the method that will be used when calling the session contract.- See the struct docs for a description of
session_args_simple,session_args_jsonandsession_args_complex.
Sourcepub fn with_transfer(
session_args_simple: Vec<&'a str>,
session_args_json: &'a str,
session_args_complex: &'a str,
) -> Self
pub fn with_transfer( session_args_simple: Vec<&'a str>, session_args_json: &'a str, session_args_complex: &'a str, ) -> Self
Constructs a SessionStrParams representing a Transfer type of Deploy.
- See the struct docs for a description of
session_args_simple,session_args_jsonandsession_args_complex.
Trait Implementations§
Source§impl<'a> Default for SessionStrParams<'a>
impl<'a> Default for SessionStrParams<'a>
Source§fn default() -> SessionStrParams<'a>
fn default() -> SessionStrParams<'a>
Auto Trait Implementations§
impl<'a> Freeze for SessionStrParams<'a>
impl<'a> RefUnwindSafe for SessionStrParams<'a>
impl<'a> Send for SessionStrParams<'a>
impl<'a> Sync for SessionStrParams<'a>
impl<'a> Unpin for SessionStrParams<'a>
impl<'a> UnwindSafe for SessionStrParams<'a>
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
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> 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>
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>
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 moreSource§impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
Source§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
Source§impl<T> PipeDeref for T
impl<T> PipeDeref for T
Source§impl<T> PipeRef for T
impl<T> PipeRef for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Source§fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
tap in debug builds, and does nothing in release builds.Source§fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Source§fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
tap_mut in debug builds, and does nothing in release builds.Source§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
Source§fn tap_ref<F, R>(self, func: F) -> Self
fn tap_ref<F, R>(self, func: F) -> Self
Source§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
tap_ref in debug builds, and does nothing in release builds.Source§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
Source§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
Source§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
Source§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
tap_borrow in debug builds, and does nothing in release builds.Source§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
Source§impl<T> TapDeref for T
impl<T> TapDeref for T
Source§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
tap_deref in debug builds, and does nothing in release builds.Source§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
self for modification.