soroban_env_host

Trait TryIntoVal

Source
pub trait TryIntoVal<E, V>
where E: Env,
{ type Error: Debug + Into<Error>; // Required method fn try_into_val(&self, env: &E) -> Result<V, Self::Error>; }
Expand description

The opposite trait to TryFromVal, analogous to the way that TryInto exists as an opposite to TryFrom. Exists only for convenience of doing conversions via .try_into_val(e) or specifying convertability with a bound like TryIntoVal<E,Other>.

Required Associated Types§

Required Methods§

Source

fn try_into_val(&self, env: &E) -> Result<V, Self::Error>

Implementors§

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