Struct soroban_sdk::Env
source · pub struct Env { /* private fields */ }
Expand description
Implementations
sourceimpl Env
impl Env
sourcepub fn data(&self) -> Data
pub fn data(&self) -> Data
Get a Data for accessing and update contract data that has been stored by the currently executing contract.
sourcepub fn events(&self) -> Events
pub fn events(&self) -> Events
Get Events for publishing events associated with the currently executing contract.
sourcepub fn accounts(&self) -> Accounts
pub fn accounts(&self) -> Accounts
Get an Accounts for accessing accounts in the current ledger.
sourcepub fn current_contract(&self) -> BytesN<32>
pub fn current_contract(&self) -> BytesN<32>
Get the 32-byte hash identifier of the current executing contract.
sourcepub fn call_stack(&self) -> Vec<(BytesN<32>, Symbol)>
pub fn call_stack(&self) -> Vec<(BytesN<32>, Symbol)>
Returns the contract call stack as a Vec
of (contract_id, function_name)
.
Examples
use soroban_sdk::{contractimpl, BytesN, Env, Symbol, symbol};
pub struct Contract;
#[contractimpl]
impl Contract {
pub fn hello(env: Env) {
let stack = env.call_stack();
assert_eq!(stack.len(), 1);
let outer = stack.get(0).unwrap().unwrap();
assert_eq!(outer.0, BytesN::from_array(&env, &[0; 32]));
assert_eq!(outer.1, symbol!("hello"));
}
}
let env = Env::default();
let contract_id = BytesN::from_array(&env, &[0; 32]);
env.register_contract(&contract_id, Contract);
let client = ContractClient::new(&env, &contract_id);
client.hello();
sourcepub fn compute_hash_sha256(&self, msg: &Bytes) -> BytesN<32>
pub fn compute_hash_sha256(&self, msg: &Bytes) -> BytesN<32>
Computes a SHA-256 hash.
sourcepub fn verify_sig_ed25519(&self, pk: &BytesN<32>, msg: &Bytes, sig: &BytesN<64>)
pub fn verify_sig_ed25519(&self, pk: &BytesN<32>, msg: &Bytes, sig: &BytesN<64>)
sourcepub fn invoke_contract<T>(
&self,
contract_id: &BytesN<32>,
func: &Symbol,
args: Vec<RawVal>
) -> Twhere
T: TryFromVal<Env, RawVal>,
pub fn invoke_contract<T>(
&self,
contract_id: &BytesN<32>,
func: &Symbol,
args: Vec<RawVal>
) -> Twhere
T: TryFromVal<Env, RawVal>,
Invokes a function of a contract that is registered in the Env.
Panics
Will panic if the contract_id
does not match a registered contract,
func
does not match a function of the referenced contract, or the
number of args
do not match the argument count of the referenced
contract function.
Will panic if the contract that is invoked fails or aborts in anyway.
Will panic if the value returned from the contract cannot be converted
into the type T
.
sourcepub fn try_invoke_contract<T, E>(
&self,
contract_id: &BytesN<32>,
func: &Symbol,
args: Vec<RawVal>
) -> Result<Result<T, T::Error>, Result<E, E::Error>>where
T: TryFromVal<Env, RawVal>,
E: TryFrom<Status>,
pub fn try_invoke_contract<T, E>(
&self,
contract_id: &BytesN<32>,
func: &Symbol,
args: Vec<RawVal>
) -> Result<Result<T, T::Error>, Result<E, E::Error>>where
T: TryFromVal<Env, RawVal>,
E: TryFrom<Status>,
Invokes a function of a contract that is registered in the Env, returns an error if the invocation fails for any reason.
sourceimpl Env
impl Env
sourcepub fn set_source_account(&self, account_id: &AccountId)
Available on crate feature testutils
only.
pub fn set_source_account(&self, account_id: &AccountId)
testutils
only.Sets the source account in the Env.
The source account will be accessible via Env::invoker when a contract is directly invoked.
sourcepub fn source_account(&self) -> AccountId
Available on crate feature testutils
only.
pub fn source_account(&self) -> AccountId
testutils
only.Gets the source account set in the Env.
sourcepub fn register_contract<'a, T: ContractFunctionSet + 'static>(
&self,
contract_id: impl Into<Option<&'a BytesN<32>>>,
contract: T
) -> BytesN<32>
Available on crate feature testutils
only.
pub fn register_contract<'a, T: ContractFunctionSet + 'static>(
&self,
contract_id: impl Into<Option<&'a BytesN<32>>>,
contract: T
) -> BytesN<32>
testutils
only.Register a contract with the Env for testing.
Passing a contract ID for the first arguments registers the contract
with that contract ID. Providing None
causes a random ID to be
assigned to the contract.
Returns the contract ID of the registered contract.
Examples
use soroban_sdk::{contractimpl, BytesN, Env, Symbol};
pub struct HelloContract;
#[contractimpl]
impl HelloContract {
pub fn hello(env: Env, recipient: soroban_sdk::Symbol) -> soroban_sdk::Symbol {
todo!()
}
}
let env = Env::default();
let contract_id = BytesN::from_array(&env, &[0; 32]);
env.register_contract(&contract_id, HelloContract);
sourcepub fn register_contract_wasm<'a>(
&self,
contract_id: impl Into<Option<&'a BytesN<32>>>,
contract_wasm: &[u8]
) -> BytesN<32>
Available on crate feature testutils
only.
pub fn register_contract_wasm<'a>(
&self,
contract_id: impl Into<Option<&'a BytesN<32>>>,
contract_wasm: &[u8]
) -> BytesN<32>
testutils
only.Register a contract in a WASM file with the Env for testing.
Passing a contract ID for the first arguments registers the contract
with that contract ID. Providing None
causes a random ID to be
assigned to the contract.
Returns the contract ID of the registered contract.
Examples
use soroban_sdk::{BytesN, Env};
const WASM: &[u8] = include_bytes!("../doctest_fixtures/contract.wasm");
let env = Env::default();
let contract_id = BytesN::from_array(&env, &[0; 32]);
env.register_contract_wasm(&contract_id, WASM);
sourcepub fn register_contract_token<'a>(
&self,
contract_id: impl Into<Option<&'a BytesN<32>>>
) -> BytesN<32>
Available on crate feature testutils
only.
pub fn register_contract_token<'a>(
&self,
contract_id: impl Into<Option<&'a BytesN<32>>>
) -> BytesN<32>
testutils
only.Register the built-in token contract with the Env for testing.
Passing a contract ID for the first arguments registers the contract
with that contract ID. Providing None
causes a random ID to be
assigned to the contract.
Returns the contract ID of the registered contract.
Examples
use soroban_sdk::{BytesN, Env};
let env = Env::default();
let contract_id = BytesN::from_array(&env, &[0; 32]);
env.register_contract_token(&contract_id);
Trait Implementations
sourceimpl IntoVal<Env, Object> for &AccountId
impl IntoVal<Env, Object> for &AccountId
fn into_val(self, _env: &Env) -> Object
fn into_env_val(self, env: &E) -> EnvVal<E, V>
sourceimpl IntoVal<Env, Object> for AccountId
impl IntoVal<Env, Object> for AccountId
fn into_val(self, _env: &Env) -> Object
fn into_env_val(self, env: &E) -> EnvVal<E, V>
sourceimpl<T> IntoVal<Env, Object> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> IntoVal<Env, Object> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
fn into_val(self, _env: &Env) -> Object
fn into_env_val(self, env: &E) -> EnvVal<E, V>
sourceimpl<K, V> IntoVal<Env, RawVal> for &Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<K, V> IntoVal<Env, RawVal> for &Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T> IntoVal<Env, RawVal> for &Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> IntoVal<Env, RawVal> for &Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<K, V> IntoVal<Env, RawVal> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<K, V> IntoVal<Env, RawVal> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T> IntoVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> IntoVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
for<'a> &'a T11: IntoVal<Env, RawVal>,
for<'a> &'a T12: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
for<'a> &'a T11: IntoVal<Env, RawVal>,
for<'a> &'a T12: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
for<'a> &'a T11: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
for<'a> &'a T11: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
impl<T0, T1, T2> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
sourceimpl<T0, T1> IntoVal<Env, Vec<RawVal>> for &(T0, T1)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
impl<T0, T1> IntoVal<Env, Vec<RawVal>> for &(T0, T1)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
T11: IntoVal<Env, RawVal>,
T12: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
T11: IntoVal<Env, RawVal>,
T12: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
T11: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
T11: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
impl<T0, T1, T2> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
sourceimpl<T0, T1> IntoVal<Env, Vec<RawVal>> for (T0, T1)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
impl<T0, T1> IntoVal<Env, Vec<RawVal>> for (T0, T1)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
sourceimpl TryFromVal<Env, AccountId> for AccountId
impl TryFromVal<Env, AccountId> for AccountId
type Error = ConversionError
fn try_from_val(env: &Env, val: AccountId) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, Object> for AccountId
impl TryFromVal<Env, Object> for AccountId
type Error = ConversionError
fn try_from_val(env: &Env, val: Object) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, Object> for BigInt
impl TryFromVal<Env, Object> for BigInt
type Error = ConversionError
fn try_from_val(env: &Env, val: Object) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, Object> for Bytes
impl TryFromVal<Env, Object> for Bytes
type Error = ConversionError
fn try_from_val(env: &Env, val: Object) -> Result<Self, Self::Error>
sourceimpl<const N: usize> TryFromVal<Env, Object> for BytesN<N>
impl<const N: usize> TryFromVal<Env, Object> for BytesN<N>
type Error = ConversionError
fn try_from_val(env: &Env, val: Object) -> Result<Self, Self::Error>
sourceimpl<K, V> TryFromVal<Env, Object> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<K, V> TryFromVal<Env, Object> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, obj: Object) -> Result<Self, Self::Error>
sourceimpl<T> TryFromVal<Env, Object> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, Object> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, obj: Object) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, RawVal> for AccountId
impl TryFromVal<Env, RawVal> for AccountId
sourceimpl TryFromVal<Env, RawVal> for Address
impl TryFromVal<Env, RawVal> for Address
type Error = ConversionError
fn try_from_val(env: &Env, val: RawVal) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, RawVal> for BigInt
impl TryFromVal<Env, RawVal> for BigInt
sourceimpl TryFromVal<Env, RawVal> for Bytes
impl TryFromVal<Env, RawVal> for Bytes
sourceimpl<const N: usize> TryFromVal<Env, RawVal> for BytesN<N>
impl<const N: usize> TryFromVal<Env, RawVal> for BytesN<N>
type Error = ConversionError
fn try_from_val(env: &Env, val: RawVal) -> Result<Self, Self::Error>
sourceimpl<K, V> TryFromVal<Env, RawVal> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<K, V> TryFromVal<Env, RawVal> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T> TryFromVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl TryFromVal<Env, ScObject> for Address
impl TryFromVal<Env, ScObject> for Address
sourceimpl<T> TryFromVal<Env, ScObject> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, ScObject> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, val: ScObject) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, ScVal> for AccountId
impl TryFromVal<Env, ScVal> for AccountId
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVal) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, ScVal> for Address
impl TryFromVal<Env, ScVal> for Address
sourceimpl TryFromVal<Env, ScVal> for BigInt
impl TryFromVal<Env, ScVal> for BigInt
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVal) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, ScVal> for Bytes
impl TryFromVal<Env, ScVal> for Bytes
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVal) -> Result<Self, Self::Error>
sourceimpl<const N: usize> TryFromVal<Env, ScVal> for BytesN<N>
impl<const N: usize> TryFromVal<Env, ScVal> for BytesN<N>
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVal) -> Result<Self, Self::Error>
sourceimpl<K, V> TryFromVal<Env, ScVal> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<K, V> TryFromVal<Env, ScVal> for Map<K, V>where
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVal) -> Result<Self, Self::Error>
sourceimpl<T> TryFromVal<Env, ScVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, ScVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVal) -> Result<Self, Self::Error>
sourceimpl TryFromVal<Env, ScVec> for Address
impl TryFromVal<Env, ScVec> for Address
sourceimpl<T> TryFromVal<Env, ScVec> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, ScVec> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVec) -> Result<Self, Self::Error>
sourceimpl TryIntoVal<Env, AccountId> for AccountId
impl TryIntoVal<Env, AccountId> for AccountId
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<AccountId, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, AccountId> for Object
impl TryIntoVal<Env, AccountId> for Object
type Error = <AccountId as TryFromVal<Env, Object>>::Error
fn try_into_val(self, env: &Env) -> Result<AccountId, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, AccountId> for RawVal
impl TryIntoVal<Env, AccountId> for RawVal
type Error = <AccountId as TryFromVal<Env, Object>>::Error
fn try_into_val(self, env: &Env) -> Result<AccountId, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, AccountId> for ScVal
impl TryIntoVal<Env, AccountId> for ScVal
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<AccountId, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, Address> for RawVal
impl TryIntoVal<Env, Address> for RawVal
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Address, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, Address> for ScObject
impl TryIntoVal<Env, Address> for ScObject
sourceimpl TryIntoVal<Env, Address> for ScVal
impl TryIntoVal<Env, Address> for ScVal
sourceimpl TryIntoVal<Env, Address> for ScVec
impl TryIntoVal<Env, Address> for ScVec
sourceimpl TryIntoVal<Env, BigInt> for Object
impl TryIntoVal<Env, BigInt> for Object
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<BigInt, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, BigInt> for RawVal
impl TryIntoVal<Env, BigInt> for RawVal
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<BigInt, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, BigInt> for ScVal
impl TryIntoVal<Env, BigInt> for ScVal
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<BigInt, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, Bytes> for Object
impl TryIntoVal<Env, Bytes> for Object
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Bytes, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, Bytes> for RawVal
impl TryIntoVal<Env, Bytes> for RawVal
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Bytes, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl TryIntoVal<Env, Bytes> for ScVal
impl TryIntoVal<Env, Bytes> for ScVal
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Bytes, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<const N: usize> TryIntoVal<Env, BytesN<N>> for Object
impl<const N: usize> TryIntoVal<Env, BytesN<N>> for Object
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<BytesN<N>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<const N: usize> TryIntoVal<Env, BytesN<N>> for RawVal
impl<const N: usize> TryIntoVal<Env, BytesN<N>> for RawVal
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<BytesN<N>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<const N: usize> TryIntoVal<Env, BytesN<N>> for ScVal
impl<const N: usize> TryIntoVal<Env, BytesN<N>> for ScVal
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<BytesN<N>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<K, V> TryIntoVal<Env, Map<K, V>> for Objectwhere
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<K, V> TryIntoVal<Env, Map<K, V>> for Objectwhere
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Map<K, V>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<K, V> TryIntoVal<Env, Map<K, V>> for RawValwhere
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<K, V> TryIntoVal<Env, Map<K, V>> for RawValwhere
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Map<K, V>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<K, V> TryIntoVal<Env, Map<K, V>> for ScValwhere
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<K, V> TryIntoVal<Env, Map<K, V>> for ScValwhere
K: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Map<K, V>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for Objectwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for Objectwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for RawValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for RawValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for ScObjectwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for ScObjectwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for ScValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for ScValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for ScVecwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for ScVecwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
Auto Trait Implementations
impl !RefUnwindSafe for Env
impl !Send for Env
impl !Sync for Env
impl Unpin for Env
impl !UnwindSafe for Env
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more