Skip to main content

Env

Struct Env 

Source
pub struct Env { /* private fields */ }
Expand description

The Env type provides access to the environment the contract is executing within.

The Env provides access to information about the currently executing contract, who invoked it, contract data, functions for signing, hashing, etc.

Most types require access to an Env to be constructed or converted.

Implementations§

Source§

impl Env

Source

pub fn storage(&self) -> Storage

Get a Storage for accessing and updating persistent data owned by the currently executing contract.

Source

pub fn events(&self) -> Events

Get Events for publishing events associated with the currently executing contract.

Source

pub fn ledger(&self) -> Ledger

Get a Ledger for accessing the current ledger.

Source

pub fn deployer(&self) -> Deployer

Get a deployer for deploying contracts.

Source

pub fn crypto(&self) -> Crypto

Get a Crypto for accessing the current cryptographic functions.

Source

pub fn prng(&self) -> Prng

Get a Prng for accessing the current functions which provide pseudo-randomness.

§Warning

The pseudo-random generator returned is not suitable for security-sensitive work.

Source

pub fn current_contract_address(&self) -> Address

Get the Address object corresponding to the current executing contract.

Source

pub fn invoke_contract<T>( &self, contract_address: &Address, func: &Symbol, args: Vec<Val>, ) -> T
where T: TryFromVal<Env, Val>,

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.

Source

pub fn try_invoke_contract<T, E>( &self, contract_address: &Address, func: &Symbol, args: Vec<Val>, ) -> Result<Result<T, <T as TryFromVal<Env, Val>>::Error>, Result<E, InvokeError>>

Invokes a function of a contract that is registered in the Env, returns an error if the invocation fails for any reason.

Source

pub fn authorize_as_current_contract( &self, auth_entries: Vec<InvokerContractAuthEntry>, )

Authorizes sub-contract calls on behalf of the current contract.

All the direct calls that the current contract performs are always considered to have been authorized. This is only needed to authorize deeper calls that originate from the next contract call from the current contract.

For example, if the contract A calls contract B, contract B calls contract C and contract C calls A.require_auth(), then an entry corresponding to C call has to be passed in auth_entries. It doesn’t matter if contract B called require_auth or not. If contract A calls contract B again, then authorize_as_current_contract has to be called again with the respective entries.

Source

pub fn logs(&self) -> Logs

Get the Logs for logging debug events.

Trait Implementations§

Source§

impl Clone for Env

Source§

fn clone(&self) -> Env

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Env

Source§

fn default() -> Env

Returns the “default value” for a type. Read more
Source§

impl<const N: usize> IntoVal<Env, BytesN<N>> for Hash<N>

Source§

fn into_val(&self, _e: &Env) -> BytesN<N>

Source§

impl IntoVal<Env, BytesN<soroban_sdk::::crypto::bls12_381::{impl#47}::{constant#0}>> for Bls12381G1Affine

Source§

fn into_val( &self, _e: &Env, ) -> BytesN<soroban_sdk::::crypto::bls12_381::{impl#47}::into_val::{constant#0}>

Source§

impl IntoVal<Env, BytesN<soroban_sdk::::crypto::bls12_381::{impl#60}::{constant#0}>> for Bls12381G2Affine

Source§

fn into_val( &self, _e: &Env, ) -> BytesN<soroban_sdk::::crypto::bls12_381::{impl#60}::into_val::{constant#0}>

Source§

impl IntoVal<Env, BytesN<soroban_sdk::::crypto::bls12_381::{impl#73}::{constant#0}>> for Bls12381Fp

Source§

fn into_val( &self, _e: &Env, ) -> BytesN<soroban_sdk::::crypto::bls12_381::{impl#73}::into_val::{constant#0}>

Source§

impl IntoVal<Env, BytesN<soroban_sdk::::crypto::bls12_381::{impl#86}::{constant#0}>> for Bls12381Fp2

Source§

fn into_val( &self, _e: &Env, ) -> BytesN<soroban_sdk::::crypto::bls12_381::{impl#86}::into_val::{constant#0}>

Source§

impl IntoVal<Env, BytesN<soroban_sdk::::crypto::bn254::{impl#34}::{constant#0}>> for Bn254G1Affine

Source§

fn into_val( &self, _e: &Env, ) -> BytesN<soroban_sdk::::crypto::bn254::{impl#34}::into_val::{constant#0}>

Source§

impl IntoVal<Env, BytesN<soroban_sdk::::crypto::bn254::{impl#47}::{constant#0}>> for Bn254G2Affine

Source§

fn into_val( &self, _e: &Env, ) -> BytesN<soroban_sdk::::crypto::bn254::{impl#47}::into_val::{constant#0}>

Source§

impl IntoVal<Env, BytesN<soroban_sdk::::crypto::bn254::{impl#60}::{constant#0}>> for Bn254Fp

Source§

fn into_val( &self, _e: &Env, ) -> BytesN<soroban_sdk::::crypto::bn254::{impl#60}::into_val::{constant#0}>

Source§

impl<const N: usize> IntoVal<Env, Val> for Hash<N>

Source§

fn into_val(&self, e: &Env) -> Val

Source§

impl TryFromVal<Env, &[u8]> for Bytes

Source§

impl TryFromVal<Env, &Address> for Val

Source§

impl TryFromVal<Env, &Bls12381Fp> for Val

Source§

impl TryFromVal<Env, &Bls12381Fp2> for Val

Source§

impl TryFromVal<Env, &Bls12381G1Affine> for Val

Source§

impl TryFromVal<Env, &Bls12381G2Affine> for Val

Source§

impl TryFromVal<Env, &Bn254Fp> for Val

Source§

impl TryFromVal<Env, &Bn254G1Affine> for Val

Source§

impl TryFromVal<Env, &Bn254G2Affine> for Val

Source§

impl TryFromVal<Env, &Fr> for Val

Source§

impl TryFromVal<Env, &Bytes> for Val

Source§

impl<const N: usize> TryFromVal<Env, &BytesN<N>> for Val

Source§

impl TryFromVal<Env, &Context> for Val

Source§

impl TryFromVal<Env, &ContractContext> for Val

Source§

impl TryFromVal<Env, &ContractExecutable> for Val

Source§

impl TryFromVal<Env, &CreateContractHostFnContext> for Val

Source§

impl TryFromVal<Env, &CreateContractWithConstructorHostFnContext> for Val

Source§

impl TryFromVal<Env, &Duration> for Val

Source§

impl TryFromVal<Env, &Executable> for Val

Source§

impl TryFromVal<Env, &Fr> for Val

Source§

impl TryFromVal<Env, &I256> for Val

Source§

impl TryFromVal<Env, &InvokerContractAuthEntry> for Val

Source§

impl<K, V> TryFromVal<Env, &Map<K, V>> for Val

Source§

type Error = Infallible

Source§

fn try_from_val( _env: &Env, v: &&Map<K, V>, ) -> Result<Val, <Val as TryFromVal<Env, &Map<K, V>>>::Error>

Source§

impl TryFromVal<Env, &MuxedAddress> for Val

Source§

impl TryFromVal<Env, &String> for Val

Source§

impl TryFromVal<Env, &SubContractInvocation> for Val

Source§

impl TryFromVal<Env, &Symbol> for Val

Source§

impl TryFromVal<Env, &Timepoint> for Val

Source§

impl TryFromVal<Env, &Token> for Val

Source§

impl TryFromVal<Env, &U256> for Val

Source§

impl<T> TryFromVal<Env, &Vec<T>> for Val

Source§

impl<T> TryFromVal<Env, &Vec<Val>> for Vec<T>

Source§

type Error = Infallible

Source§

fn try_from_val( env: &Env, v: &&Vec<Val>, ) -> Result<Vec<T>, <Vec<T> as TryFromVal<Env, &Vec<Val>>>::Error>

Source§

impl TryFromVal<Env, &str> for Bytes

Source§

impl TryFromVal<Env, &str> for String

Source§

impl TryFromVal<Env, &str> for Symbol

Source§

impl<const N: usize> TryFromVal<Env, [u8; N]> for Bytes

Source§

impl<const N: usize> TryFromVal<Env, [u8; N]> for BytesN<N>

Source§

type Error = ConversionError

Source§

fn try_from_val( env: &Env, v: &[u8; N], ) -> Result<BytesN<N>, <BytesN<N> as TryFromVal<Env, [u8; N]>>::Error>

Source§

impl TryFromVal<Env, ()> for ()

Source§

impl TryFromVal<Env, ()> for Vec<Val>

Source§

impl<T0> TryFromVal<Env, (T0,)> for Vec<Val>
where T0: IntoVal<Env, Val>,

Source§

impl<T0, T1> TryFromVal<Env, (T0, T1)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2> TryFromVal<Env, (T0, T1, T2)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3> TryFromVal<Env, (T0, T1, T2, T3)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4> TryFromVal<Env, (T0, T1, T2, T3, T4)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4, T5> TryFromVal<Env, (T0, T1, T2, T3, T4, T5)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>, T5: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4, T5, T6> TryFromVal<Env, (T0, T1, T2, T3, T4, T5, T6)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>, T5: IntoVal<Env, Val>, T6: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> TryFromVal<Env, (T0, T1, T2, T3, T4, T5, T6, T7)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>, T5: IntoVal<Env, Val>, T6: IntoVal<Env, Val>, T7: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> TryFromVal<Env, (T0, T1, T2, T3, T4, T5, T6, T7, T8)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>, T5: IntoVal<Env, Val>, T6: IntoVal<Env, Val>, T7: IntoVal<Env, Val>, T8: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> TryFromVal<Env, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>, T5: IntoVal<Env, Val>, T6: IntoVal<Env, Val>, T7: IntoVal<Env, Val>, T8: IntoVal<Env, Val>, T9: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> TryFromVal<Env, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>, T5: IntoVal<Env, Val>, T6: IntoVal<Env, Val>, T7: IntoVal<Env, Val>, T8: IntoVal<Env, Val>, T9: IntoVal<Env, Val>, T10: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> TryFromVal<Env, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>, T5: IntoVal<Env, Val>, T6: IntoVal<Env, Val>, T7: IntoVal<Env, Val>, T8: IntoVal<Env, Val>, T9: IntoVal<Env, Val>, T10: IntoVal<Env, Val>, T11: IntoVal<Env, Val>,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> TryFromVal<Env, (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Vec<Val>
where T0: IntoVal<Env, Val>, T1: IntoVal<Env, Val>, T2: IntoVal<Env, Val>, T3: IntoVal<Env, Val>, T4: IntoVal<Env, Val>, T5: IntoVal<Env, Val>, T6: IntoVal<Env, Val>, T7: IntoVal<Env, Val>, T8: IntoVal<Env, Val>, T9: IntoVal<Env, Val>, T10: IntoVal<Env, Val>, T11: IntoVal<Env, Val>, T12: IntoVal<Env, Val>,

Source§

impl TryFromVal<Env, Address> for Val

Source§

impl TryFromVal<Env, AddressObject> for Address

Source§

impl TryFromVal<Env, AddressObject> for MuxedAddress

Source§

impl TryFromVal<Env, Bls12381Fp> for Val

Source§

impl TryFromVal<Env, Bls12381Fp2> for Val

Source§

impl TryFromVal<Env, Bls12381G1Affine> for Val

Source§

impl TryFromVal<Env, Bls12381G2Affine> for Val

Source§

impl TryFromVal<Env, Bn254Fp> for Val

Source§

impl TryFromVal<Env, Bn254G1Affine> for Val

Source§

impl TryFromVal<Env, Bn254G2Affine> for Val

Source§

impl TryFromVal<Env, Fr> for Val

Source§

impl TryFromVal<Env, Bytes> for Bytes

Source§

impl TryFromVal<Env, Bytes> for Val

Source§

impl<const N: usize> TryFromVal<Env, BytesN<N>> for [u8; N]

Source§

type Error = ConversionError

Source§

fn try_from_val( _env: &Env, v: &BytesN<N>, ) -> Result<[u8; N], <[u8; N] as TryFromVal<Env, BytesN<N>>>::Error>

Source§

impl<const N: usize> TryFromVal<Env, BytesN<N>> for Bytes

Source§

impl<const N: usize> TryFromVal<Env, BytesN<N>> for BytesN<N>

Source§

impl<const N: usize> TryFromVal<Env, BytesN<N>> for Val

Source§

impl TryFromVal<Env, BytesObject> for Bytes

Source§

impl<const N: usize> TryFromVal<Env, BytesObject> for BytesN<N>

Source§

impl TryFromVal<Env, Context> for Val

Source§

impl TryFromVal<Env, ContractContext> for Val

Source§

impl TryFromVal<Env, ContractExecutable> for Val

Source§

impl TryFromVal<Env, CreateContractHostFnContext> for Val

Source§

impl TryFromVal<Env, CreateContractWithConstructorHostFnContext> for Val

Source§

impl TryFromVal<Env, Duration> for Val

Source§

impl TryFromVal<Env, DurationVal> for Duration

Source§

impl TryFromVal<Env, Error> for Error

Source§

impl TryFromVal<Env, Executable> for Val

Source§

impl TryFromVal<Env, Fr> for Val

Source§

impl TryFromVal<Env, I256> for Val

Source§

impl TryFromVal<Env, I256Val> for I256

Source§

impl TryFromVal<Env, InvokerContractAuthEntry> for Val

Source§

impl<K, V> TryFromVal<Env, Map<K, V>> for ScVal

Available on non-target_family=wasm only.
Source§

impl<K, V> TryFromVal<Env, Map<K, V>> for Val

Source§

type Error = Infallible

Source§

fn try_from_val( _env: &Env, v: &Map<K, V>, ) -> Result<Val, <Val as TryFromVal<Env, Map<K, V>>>::Error>

Source§

impl<K, V> TryFromVal<Env, MapObject> for Map<K, V>

Source§

impl TryFromVal<Env, MuxedAddress> for Val

Source§

impl TryFromVal<Env, MuxedAddressObject> for MuxedAddress

Source§

impl TryFromVal<Env, ScAddress> for Address

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScAddress> for MuxedAddress

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScSymbol> for Symbol

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScVal> for Address

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScVal> for Bytes

Available on non-target_family=wasm only.
Source§

impl<const N: usize> TryFromVal<Env, ScVal> for BytesN<N>

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScVal> for Duration

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScVal> for I256

Available on non-target_family=wasm only.
Source§

impl<K, V> TryFromVal<Env, ScVal> for Map<K, V>

Available on non-target_family=wasm only.
Source§

type Error = ConversionError

Source§

fn try_from_val( env: &Env, val: &ScVal, ) -> Result<Map<K, V>, <Map<K, V> as TryFromVal<Env, ScVal>>::Error>

Source§

impl TryFromVal<Env, ScVal> for MuxedAddress

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScVal> for String

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScVal> for Symbol

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScVal> for Timepoint

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, ScVal> for U256

Available on non-target_family=wasm only.
Source§

impl<T> TryFromVal<Env, ScVal> for Vec<T>
where T: IntoVal<Env, Val> + TryFromVal<Env, Val>,

Available on non-target_family=wasm only.
Source§

impl<T> TryFromVal<Env, ScVec> for Vec<T>
where T: IntoVal<Env, Val> + TryFromVal<Env, Val>,

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, String> for String

Source§

impl TryFromVal<Env, String> for Val

Source§

impl TryFromVal<Env, StringObject> for String

Source§

impl TryFromVal<Env, SubContractInvocation> for Val

Source§

impl TryFromVal<Env, Symbol> for ScVal

Available on non-target_family=wasm only.
Source§

impl TryFromVal<Env, Symbol> for Symbol

Source§

impl TryFromVal<Env, Symbol> for Val

Source§

impl TryFromVal<Env, Timepoint> for Val

Source§

impl TryFromVal<Env, TimepointVal> for Timepoint

Source§

impl TryFromVal<Env, Token> for Val

Source§

impl TryFromVal<Env, U256> for Val

Source§

impl TryFromVal<Env, U256Val> for U256

Source§

impl TryFromVal<Env, Val> for Address

Source§

impl TryFromVal<Env, Val> for Bls12381Fp

Source§

impl TryFromVal<Env, Val> for Bls12381Fp2

Source§

impl TryFromVal<Env, Val> for Bls12381G1Affine

Source§

impl TryFromVal<Env, Val> for Bls12381G2Affine

Source§

impl TryFromVal<Env, Val> for Bn254Fp

Source§

impl TryFromVal<Env, Val> for Bn254G1Affine

Source§

impl TryFromVal<Env, Val> for Bn254G2Affine

Source§

impl TryFromVal<Env, Val> for Fr

Source§

impl TryFromVal<Env, Val> for Bytes

Source§

impl<const N: usize> TryFromVal<Env, Val> for BytesN<N>

Source§

impl TryFromVal<Env, Val> for Context

Source§

impl TryFromVal<Env, Val> for ContractContext

Source§

impl TryFromVal<Env, Val> for ContractExecutable

Source§

impl TryFromVal<Env, Val> for CreateContractHostFnContext

Source§

impl TryFromVal<Env, Val> for CreateContractWithConstructorHostFnContext

Source§

impl TryFromVal<Env, Val> for Duration

Source§

impl TryFromVal<Env, Val> for Executable

Source§

impl TryFromVal<Env, Val> for Fr

Source§

impl TryFromVal<Env, Val> for I256

Source§

impl TryFromVal<Env, Val> for InvokerContractAuthEntry

Source§

impl<K, V> TryFromVal<Env, Val> for Map<K, V>

Source§

type Error = ConversionError

Source§

fn try_from_val( env: &Env, val: &Val, ) -> Result<Map<K, V>, <Map<K, V> as TryFromVal<Env, Val>>::Error>

Source§

impl TryFromVal<Env, Val> for MuxedAddress

Source§

impl TryFromVal<Env, Val> for String

Source§

impl TryFromVal<Env, Val> for SubContractInvocation

Source§

impl TryFromVal<Env, Val> for Symbol

Source§

impl TryFromVal<Env, Val> for Timepoint

Source§

impl TryFromVal<Env, Val> for Token

Source§

impl TryFromVal<Env, Val> for U256

Source§

impl<T> TryFromVal<Env, Val> for Vec<T>
where T: IntoVal<Env, Val> + TryFromVal<Env, Val>,

Source§

impl<T> TryFromVal<Env, Vec<T>> for Val

Source§

impl<T> TryFromVal<Env, Vec<T>> for Vec<Val>

Source§

impl<T> TryFromVal<Env, VecM<ScVal>> for Vec<T>
where T: IntoVal<Env, Val> + TryFromVal<Env, Val>,

Available on non-target_family=wasm only.
Source§

impl<T> TryFromVal<Env, VecObject> for Vec<T>
where T: IntoVal<Env, Val> + TryFromVal<Env, Val>,

Source§

impl TryFromVal<Env, bool> for bool

Source§

impl TryFromVal<Env, i128> for i128

Source§

impl TryFromVal<Env, i32> for i32

Source§

impl TryFromVal<Env, i64> for i64

Source§

impl TryFromVal<Env, u128> for u128

Source§

impl TryFromVal<Env, u32> for u32

Source§

impl TryFromVal<Env, u64> for u64

Auto Trait Implementations§

§

impl Freeze for Env

§

impl !RefUnwindSafe for Env

§

impl !Send for Env

§

impl !Sync for Env

§

impl Unpin for Env

§

impl UnsafeUnpin for Env

§

impl !UnwindSafe for Env

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, C> Compare<&T> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare(&self, a: &&T, b: &&T) -> Result<Ordering, <C as Compare<&T>>::Error>

Source§

impl<T, U, E, C> Compare<(T, U)> for C
where C: Compare<T, Error = E, Error = E> + Compare<U>,

Source§

type Error = E

Source§

fn compare( &self, a: &(T, U), b: &(T, U), ) -> Result<Ordering, <C as Compare<(T, U)>>::Error>

Source§

impl<T, U, V, E, C> Compare<(T, U, V)> for C
where C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,

Source§

impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
where C: Compare<T, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W>,

Source§

impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
where C: Compare<T, Error = E, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W> + Compare<X>,

Source§

impl<E> Compare<AddressObject> for E
where E: Env,

Source§

impl<E> Compare<Bool> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &Bool, b: &Bool, ) -> Result<Ordering, <E as Compare<Bool>>::Error>

Source§

impl<T, C> Compare<Box<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Box<T>, b: &Box<T>, ) -> Result<Ordering, <C as Compare<Box<T>>>::Error>

Source§

impl<E> Compare<BytesObject> for E
where E: Env,

Source§

impl<E> Compare<DurationObject> for E
where E: Env,

Source§

impl<E> Compare<DurationSmall> for E
where E: Env,

Source§

impl<E> Compare<Error> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &Error, b: &Error, ) -> Result<Ordering, <E as Compare<Error>>::Error>

Source§

impl<E> Compare<I128Object> for E
where E: Env,

Source§

impl<E> Compare<I128Small> for E
where E: Env,

Source§

impl<E> Compare<I256Object> for E
where E: Env,

Source§

impl<E> Compare<I256Small> for E
where E: Env,

Source§

impl<E> Compare<I32Val> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &I32Val, b: &I32Val, ) -> Result<Ordering, <E as Compare<I32Val>>::Error>

Source§

impl<E> Compare<I64Object> for E
where E: Env,

Source§

impl<E> Compare<I64Small> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &I64Small, b: &I64Small, ) -> Result<Ordering, <E as Compare<I64Small>>::Error>

Source§

impl<E> Compare<MapObject> for E
where E: Env,

Source§

impl<E> Compare<MuxedAddressObject> for E
where E: Env,

Source§

impl<E> Compare<Object> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &Object, b: &Object, ) -> Result<Ordering, <E as Compare<Object>>::Error>

Source§

impl<T, C> Compare<Option<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Option<T>, b: &Option<T>, ) -> Result<Ordering, <C as Compare<Option<T>>>::Error>

Source§

impl<T, C> Compare<Rc<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Rc<T>, b: &Rc<T>, ) -> Result<Ordering, <C as Compare<Rc<T>>>::Error>

Source§

impl<E> Compare<StringObject> for E
where E: Env,

Source§

impl<E> Compare<Symbol> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &Symbol, b: &Symbol, ) -> Result<Ordering, <E as Compare<Symbol>>::Error>

Source§

impl<E> Compare<SymbolObject> for E
where E: Env,

Source§

impl<E> Compare<SymbolSmall> for E
where E: Env,

Source§

impl<E> Compare<TimepointObject> for E
where E: Env,

Source§

impl<E> Compare<TimepointSmall> for E
where E: Env,

Source§

impl<E> Compare<U128Object> for E
where E: Env,

Source§

impl<E> Compare<U128Small> for E
where E: Env,

Source§

impl<E> Compare<U256Object> for E
where E: Env,

Source§

impl<E> Compare<U256Small> for E
where E: Env,

Source§

impl<E> Compare<U32Val> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &U32Val, b: &U32Val, ) -> Result<Ordering, <E as Compare<U32Val>>::Error>

Source§

impl<E> Compare<U64Object> for E
where E: Env,

Source§

impl<E> Compare<U64Small> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &U64Small, b: &U64Small, ) -> Result<Ordering, <E as Compare<U64Small>>::Error>

Source§

impl<E> Compare<Val> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, a: &Val, b: &Val, ) -> Result<Ordering, <E as Compare<Val>>::Error>

Source§

impl<T, C> Compare<Vec<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Vec<T>, b: &Vec<T>, ) -> Result<Ordering, <C as Compare<Vec<T>>>::Error>

Source§

impl<E> Compare<VecObject> for E
where E: Env,

Source§

impl<E> Compare<Void> for E
where E: Env,

Source§

type Error = <E as EnvBase>::Error

Source§

fn compare( &self, _a: &Void, _b: &Void, ) -> Result<Ordering, <E as Compare<Void>>::Error>

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

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

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

impl<E, T, U> IntoVal<E, T> for U
where E: Env, T: FromVal<E, U>,

Source§

fn into_val(&self, e: &E) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<E, T, U> TryIntoVal<E, T> for U
where E: Env, T: TryFromVal<E, U>,

Source§

type Error = <T as TryFromVal<E, U>>::Error

Source§

fn try_into_val(&self, env: &E) -> Result<T, <U as TryIntoVal<E, T>>::Error>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V