Trait IntoScVal

Source
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§

Implementations on Foreign Types§

Source§

impl IntoScVal for bool

Converts a boolean value into an ScVal::Bool.

Source§

impl IntoScVal for i32

Converts a 32-bit signed integer into an ScVal::I32.

Source§

impl IntoScVal for i64

Converts a 64-bit signed integer into an ScVal::I64.

Source§

impl IntoScVal for u32

Converts a 32-bit unsigned integer into an ScVal::U32.

Source§

impl IntoScVal for u64

Converts a 64-bit unsigned integer into an ScVal::U64.

Source§

impl IntoScVal for String

Converts a Rust String into an ScVal::String by first converting to a Stellar StringM.

Source§

impl IntoScVal for Vec<ScVal>

Converts a vector of ScVal objects into an ScVal::Vec.

Source§

impl IntoScVal for Duration

Converts a Rust Duration into an ScVal::Duration using seconds as the time unit.

Source§

impl IntoScVal for [u8; 32]

Converts a 32-byte array into an ScVal::Bytes.

Implementors§

Source§

impl IntoScVal for AccountId

Converts a Stellar AccountId into an ScVal::Address containing an account.