[][src]Trait artichoke_backend::prelude::TryConvert

pub trait TryConvert<T, U> {
    type Error;
    pub fn try_convert(&self, value: T) -> Result<U, Self::Error>;
}

Fallible conversions between two types.

Implementors may not allocate on the interpreter heap.

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

Associated Types

type Error[src]

Error type for failed conversions.

Loading content...

Required methods

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

Performs the fallible conversion.

Errors

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

Loading content...

Implementors

impl TryConvert<isize, Value> for Artichoke[src]

type Error = Error

impl TryConvert<u64, Value> for Artichoke[src]

type Error = Error

impl TryConvert<usize, Value> for Artichoke[src]

type Error = Error

impl TryConvert<Value, Option<bool>> for Artichoke[src]

type Error = Error

impl TryConvert<Value, Option<i64>> for Artichoke[src]

type Error = Error

impl TryConvert<Value, bool> for Artichoke[src]

type Error = Error

impl TryConvert<Value, f64> for Artichoke[src]

type Error = Error

impl TryConvert<Value, i64> for Artichoke[src]

type Error = Error

impl TryConvert<Value, u32> for Artichoke[src]

type Error = Error

impl TryConvert<Value, usize> for Artichoke[src]

type Error = Error

impl TryConvert<Value, Float> for Artichoke[src]

type Error = Error

impl TryConvert<Value, Integer> for Artichoke[src]

type Error = Error

impl<T, U> TryConvert<T, U> for Artichoke where
    Artichoke: Convert<T, U>, 
[src]

Provide a fallible converter for types that implement an infallible conversion.

type Error = Error

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

Blanket implementation that always succeeds by delegating to Convert::convert.

Loading content...