Type Alias VectorRef

Source
pub type VectorRef<'a> = VectorInner<&'a [VectorItemType]>;

Aliased Type§

pub struct VectorRef<'a> {
    pub(crate) inner: &'a [OrderedFloat<f32>],
}

Fields§

§inner: &'a [OrderedFloat<f32>]

Implementations§

Source§

impl<'a> VectorRef<'a>

Source

pub fn from_slice_unchecked(inner: &'a [VectorItemType]) -> Self

Create a VectorRef from a slice of VectorItemType without checking the elements in the slice is invalid, such as inf and nan.

Source

pub fn memcmp_serialize( self, serializer: &mut Serializer<impl BufMut>, ) -> Result<()>

Trait Implementations§

Source§

impl Debug for VectorRef<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> ScalarRef<'a> for VectorRef<'a>

Source§

type ScalarType = VectorInner<Box<[OrderedFloat<f32>]>>

ScalarType is the owned type of current ScalarRef.
Source§

fn to_owned_scalar(&self) -> VectorVal

Convert ScalarRef to an owned scalar.
Source§

fn hash_scalar<H: Hasher>(&self, state: &mut H)

A wrapped hash function to get the hash value for this scaler.
Source§

impl ToText for VectorRef<'_>

Source§

fn write<W: Write>(&self, f: &mut W) -> Result

Write the text to the writer regardless of its data type Read more
Source§

fn write_with_type<W: Write>(&self, _ty: &DataType, f: &mut W) -> Result

Write the text to the writer according to its data type
Source§

fn to_text_with_type(&self, ty: &DataType) -> String

Convert to text according to its data type
Source§

fn to_text(&self) -> String

to_text is a special version of to_text_with_type, it convert the scalar to default type text. E.g. for Int64, it will convert to text as a Int64 type. We should prefer to use to_text_with_type because it’s more clear and readable. Read more
Source§

impl<'scalar> TryFrom<ScalarRefImpl<'scalar>> for VectorRef<'scalar>

Source§

type Error = ArrayError

The type returned in the event of a conversion error.
Source§

fn try_from(val: ScalarRefImpl<'scalar>) -> ArrayResult<Self>

Performs the conversion.