Skip to main content

TryFromList

Trait TryFromList 

Source
pub trait TryFromList: Sized {
    type Error;

    // Required method
    fn try_from_list(list: List) -> Result<Self, Self::Error>;
}
Expand description

Fallible conversion from an R list into a Rust value.

Required Associated Types§

Source

type Error

Error returned when conversion fails.

Required Methods§

Source

fn try_from_list(list: List) -> Result<Self, Self::Error>

Attempt to convert an R list wrapper into Self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromList for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromList for (A, B, C, D, E, F, G, H, I, J, K)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromList for (A, B, C, D, E, F, G, H, I, J)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromList for (A, B, C, D, E, F, G, H, I)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromList for (A, B, C, D, E, F, G, H)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromList for (A, B, C, D, E, F, G)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromList for (A, B, C, D, E, F)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromList for (A, B, C, D, E)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromList for (A, B, C, D)

Source§

impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromList for (A, B, C)

Source§

impl<A: TryFromSexp, B: TryFromSexp> TryFromList for (A, B)

Source§

impl<A: TryFromSexp> TryFromList for (A,)
where A::Error: Into<SexpError>,

Source§

impl<T> TryFromList for BTreeSet<T>
where T: TryFromSexp<Error = SexpError> + Ord,

Source§

impl<T> TryFromList for HashSet<T>
where T: TryFromSexp<Error = SexpError> + Eq + Hash,

Source§

impl<T> TryFromList for Vec<T>
where T: TryFromSexp<Error = SexpError>,

Source§

impl<V> TryFromList for BTreeMap<String, V>
where V: TryFromSexp<Error = SexpError>,

Keys are the element names; an element without a usable name (no names attribute, NA, or not valid UTF-8) is keyed by its 0-based position, and empty names share the key "" (the last one wins). A non-empty name that appears more than once is an error (SexpError::DuplicateName), as for the TryFromSexp map conversion.

Source§

impl<V> TryFromList for HashMap<String, V>
where V: TryFromSexp<Error = SexpError>,

Keys are the element names; an element without a usable name (no names attribute, NA, or not valid UTF-8) is keyed by its 0-based position, and empty names share the key "" (the last one wins). A non-empty name that appears more than once is an error (SexpError::DuplicateName), as for the TryFromSexp map conversion.

Implementors§