vortex_array/array/
convert.rs

1use vortex_error::VortexResult;
2
3use crate::ArrayRef;
4
5/// Trait for converting a type into a Vortex [`ArrayRef`].
6pub trait IntoArray {
7    fn into_array(self) -> ArrayRef;
8}
9
10/// Trait for converting a type into a Vortex [`ArrayRef`], returning an error if the conversion fails.
11pub trait TryIntoArray {
12    fn try_into_array(self) -> VortexResult<ArrayRef>;
13}
14
15impl IntoArray for ArrayRef {
16    fn into_array(self) -> ArrayRef {
17        self
18    }
19}