[][src]Trait artichoke_backend::TryConvert

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

Fallible conversions between two types.

Implementors may not allocate on the interpreter heap.

See std::convert::TryFrom. See TryConvertMut.

Associated Types

type Error: Error

Error type for failed conversions.

Loading content...

Required methods

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

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<u64, Value> for Artichoke[src]

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

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

type Error = Exception

impl TryConvert<Value, Vec<(Value, Value)>> for Artichoke[src]

type Error = Exception

impl TryConvert<Value, Vec<u8>> for Artichoke[src]

type Error = Exception

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

type Error = Exception

impl TryConvert<Value, Vec<String>> for Artichoke[src]

type Error = Exception

impl TryConvert<Value, Vec<Vec<u8>>> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, &'a str> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, Option<&'a str>> for Artichoke[src]

type Error = Exception

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

type Error = Exception

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

type Error = Exception

impl<'a> TryConvert<Value, Option<&'a [u8]>> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, Option<String>> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, Option<Vec<u8>>> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, &'a [u8]> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, Vec<&'a str>> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, Vec<Option<&'a str>>> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, Vec<Option<&'a [u8]>>> for Artichoke[src]

type Error = Exception

impl<'a> TryConvert<Value, Vec<&'a [u8]>> for Artichoke[src]

type Error = Exception

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 = Exception

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

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

Loading content...