pub trait IntoScVal {
// Required methods
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>;
fn into_val(self) -> ScVal;
}Expand description
A trait for converting native rust values into a ScVal.
Required Methods§
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Implementations on Foreign Types§
Source§impl IntoScVal for bool
Converts a boolean value into an ScVal::Bool.
impl IntoScVal for bool
Converts a boolean value into an ScVal::Bool.
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Source§impl IntoScVal for i32
Converts a 32-bit signed integer into an ScVal::I32.
impl IntoScVal for i32
Converts a 32-bit signed integer into an ScVal::I32.
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Source§impl IntoScVal for i64
Converts a 64-bit signed integer into an ScVal::I64.
impl IntoScVal for i64
Converts a 64-bit signed integer into an ScVal::I64.
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Source§impl IntoScVal for u32
Converts a 32-bit unsigned integer into an ScVal::U32.
impl IntoScVal for u32
Converts a 32-bit unsigned integer into an ScVal::U32.
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Source§impl IntoScVal for u64
Converts a 64-bit unsigned integer into an ScVal::U64.
impl IntoScVal for u64
Converts a 64-bit unsigned integer into an ScVal::U64.
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Source§impl IntoScVal for String
Converts a Rust String into an ScVal::String by first converting to a Stellar StringM.
impl IntoScVal for String
Converts a Rust String into an ScVal::String by first converting to a Stellar StringM.
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Source§impl IntoScVal for Vec<ScVal>
Converts a vector of ScVal objects into an ScVal::Vec.
impl IntoScVal for Vec<ScVal>
Converts a vector of ScVal objects into an ScVal::Vec.
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Source§impl IntoScVal for Duration
Converts a Rust Duration into an ScVal::Duration using seconds as the time unit.
impl IntoScVal for Duration
Converts a Rust Duration into an ScVal::Duration using seconds as the time unit.
fn try_into_val(&self) -> Result<ScVal, SorobanHelperError>
fn into_val(self) -> ScVal
Source§impl IntoScVal for [u8; 32]
Converts a 32-byte array into an ScVal::Bytes.
impl IntoScVal for [u8; 32]
Converts a 32-byte array into an ScVal::Bytes.