Skip to main content

TryIntoCollection

Trait TryIntoCollection 

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

Top-level API to deserialize from Arrow

Required Methods§

Source

fn try_into_collection(self) -> Result<Collection, ArrowError>
where Element: ArrowDeserialize + ArrowField<Type = Element> + 'static,

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

Source

fn try_into_collection_as_type<ArrowType>( self, ) -> Result<Collection, ArrowError>
where ArrowType: ArrowDeserialize + ArrowField<Type = Element> + 'static,

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Collection, Element, ArrowArray> TryIntoCollection<Collection, Element> for ArrowArray
where Element: 'static, ArrowArray: Borrow<dyn Array>, Collection: FromIterator<Element>,