AsDynArray

Trait AsDynArray 

Source
pub trait AsDynArray {
    // Required method
    fn as_dyn_array(&self) -> &dyn Array;
}
Expand description

Something that can be returned as a &dyn Array.

We want create_hashes to accept either &dyn Array or ArrayRef, and this seems the best way to do so.

We tried having it accept AsRef<dyn Array> but that is not implemented for and cannot be implemented for &dyn Array so callers that have the latter would not be able to call create_hashes directly. This shim trait makes it possible.

Required Methods§

Source

fn as_dyn_array(&self) -> &dyn Array

Implementations on Foreign Types§

Source§

impl AsDynArray for &ArrayRef

Source§

fn as_dyn_array(&self) -> &dyn Array

Source§

impl AsDynArray for &dyn Array

Source§

fn as_dyn_array(&self) -> &dyn Array

Source§

impl AsDynArray for ArrayRef

Source§

fn as_dyn_array(&self) -> &dyn Array

Source§

impl AsDynArray for dyn Array

Source§

fn as_dyn_array(&self) -> &dyn Array

Implementors§