Trait artichoke_backend::core::TryConvert

source ·
pub trait TryConvert<T, U> {
    type Error;

    // Required method
    fn try_convert(&self, value: T) -> Result<U, Self::Error>;
Expand description

Fallible conversions between two types.

Implementors may not allocate on the interpreter heap.

See core::convert::TryFrom. See TryConvertMut.

Required Associated Types§


type Error

Error type for failed conversions.

Required Methods§


fn try_convert(&self, value: T) -> Result<U, Self::Error>

Performs the fallible conversion.


If boxing or unboxing a value into the specified type fails, an error is returned.