pub trait TryIntoCollection<Collection, Element>where
    Element: ArrowField,
    Collection: FromIterator<Element>,{
    // Required methods
    fn try_into_collection(self) -> Result<Collection>;
    fn try_into_collection_as_type<ArrowType>(self) -> Result<Collection>
       where ArrowType: ArrowDeserialize + ArrowField<Type = Element> + 'static,
             for<'b> &'b <ArrowType as ArrowDeserialize>::ArrayType: IntoIterator;
}
Expand description

Top-level API to deserialize from Arrow

Required Methods§

source

fn try_into_collection(self) -> Result<Collection>

Convert from a arrow2::Array to any collection that implements the FromIterator trait

source

fn try_into_collection_as_type<ArrowType>(self) -> Result<Collection>where ArrowType: ArrowDeserialize + ArrowField<Type = Element> + 'static, for<'b> &'b <ArrowType as ArrowDeserialize>::ArrayType: IntoIterator,

Same as try_into_collection except can coerce the conversion to a specific Arrow type. This is useful when the same rust type maps to one or more Arrow types for example LargeString.

Implementors§

source§

impl<Collection, Element, ArrowArray> TryIntoCollection<Collection, Element> for ArrowArraywhere Element: ArrowDeserialize + ArrowField<Type = Element> + 'static, for<'b> &'b <Element as ArrowDeserialize>::ArrayType: IntoIterator, ArrowArray: Borrow<dyn Array>, Collection: FromIterator<Element>,