Struct soroban_env_host::EnvVal
source · [−]pub struct EnvVal<E, V> where
E: Env, {
pub env: E,
pub val: V,
}Expand description
Some type of value coupled to a specific instance of Env, which some of the value’s methods may call into to support some conversion and comparison functions.
The value and Env instance used in an EnvVal will vary by context:
- In contract code compiled for WASM, the
Envis a zero-sizedGueststruct - In contract code compiled natively for local testing, the
Envis a reference-countedHost - Inside the
Host, theEnvis either aHostor a weak reference to aHost
The value will typically either be RawVal or one of its tag-specific wrapper types.
Fields
env: EThe environment to call into for comparison and conversion assistance.
val: VThe value that will call into the environment as needed.
Implementations
Trait Implementations
sourceimpl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
T8: IntoVal<E, RawVal>,
T9: IntoVal<E, RawVal>,
T10: IntoVal<E, RawVal>,
T11: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
T8: IntoVal<E, RawVal>,
T9: IntoVal<E, RawVal>,
T10: IntoVal<E, RawVal>,
T11: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
T8: IntoVal<E, RawVal>,
T9: IntoVal<E, RawVal>,
T10: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
T8: IntoVal<E, RawVal>,
T9: IntoVal<E, RawVal>,
T10: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
T8: IntoVal<E, RawVal>,
T9: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
T8: IntoVal<E, RawVal>,
T9: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
T8: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
T8: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
T7: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2, T3, T4, T5, T6> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3, T4, T5, T6> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5, T6) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
T6: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2, T3, T4, T5> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3, T4, T5> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4, T5) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
T5: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2, T3, T4> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3, T4> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3, T4) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
T4: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2, T3> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
impl<E, T0, T1, T2, T3> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2, T3) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
T3: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1, T2> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
impl<E, T0, T1, T2> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1, T2) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
T2: IntoVal<E, RawVal>,
sourceimpl<E, T0, T1> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
impl<E, T0, T1> IntoVal<E, EnvVal<E, RawVal>> for (T0, T1) where
E: Env,
T0: IntoVal<E, RawVal>,
T1: IntoVal<E, RawVal>,
sourceimpl<E, V> Ord for EnvVal<E, V> where
E: Env,
V: Val,
impl<E, V> Ord for EnvVal<E, V> where
E: Env,
V: Val,
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<E, V> PartialOrd<EnvVal<E, V>> for EnvVal<E, V> where
E: Env,
V: Val,
impl<E, V> PartialOrd<EnvVal<E, V>> for EnvVal<E, V> where
E: Env,
V: Val,
sourcefn partial_cmp(&self, other: &EnvVal<E, V>) -> Option<Ordering>
fn partial_cmp(&self, other: &EnvVal<E, V>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl<E> TryFrom<EnvVal<E, RawVal>> for ScVal where
E: Env,
ScObject: TryFrom<EnvVal<E, Object>>,
impl<E> TryFrom<EnvVal<E, RawVal>> for ScVal where
E: Env,
ScObject: TryFrom<EnvVal<E, Object>>,
impl<E, V> Eq for EnvVal<E, V> where
E: Env,
V: Val,
Auto Trait Implementations
impl<E, V> RefUnwindSafe for EnvVal<E, V> where
E: RefUnwindSafe,
V: RefUnwindSafe,
impl<E, V> Send for EnvVal<E, V> where
E: Send,
V: Send,
impl<E, V> Sync for EnvVal<E, V> where
E: Sync,
V: Sync,
impl<E, V> Unpin for EnvVal<E, V> where
E: Unpin,
V: Unpin,
impl<E, V> UnwindSafe for EnvVal<E, V> where
E: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
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>
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. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
fn as_any(&self) -> &(dyn Any + 'static)
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. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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. Read more