Struct arrow::array::FixedSizeBinaryArray[][src]

pub struct FixedSizeBinaryArray { /* fields omitted */ }
Expand description

A type of FixedSizeListArray whose elements are binaries.

Examples

Create an array from an iterable argument of byte slices.

   use arrow::array::{Array, FixedSizeBinaryArray};
   let input_arg = vec![ vec![1, 2], vec![3, 4], vec![5, 6] ];
   let arr = FixedSizeBinaryArray::try_from_iter(input_arg.into_iter()).unwrap();

   assert_eq!(3, arr.len());

Create an array from an iterable argument of sparse byte slices. Sparsity means that the input argument can contain None items.

   use arrow::array::{Array, FixedSizeBinaryArray};
   let input_arg = vec![ None, Some(vec![7, 8]), Some(vec![9, 10]), None, Some(vec![13, 14]) ];
   let arr = FixedSizeBinaryArray::try_from_sparse_iter(input_arg.into_iter()).unwrap();
   assert_eq!(5, arr.len())

Implementations

Returns the element at index i as a byte slice.

Returns the offset for the element at index i.

Note this doesn’t do any bound checking, for performance reason.

Returns the length for an element.

All elements have the same length as the array is a fixed size.

Returns a clone of the value data buffer

Create an array from an iterable argument of sparse byte slices. Sparsity means that items returned by the iterator are optional, i.e input argument can contain None items.

Examples

use arrow::array::FixedSizeBinaryArray;
let input_arg = vec![
    None,
    Some(vec![7, 8]),
    Some(vec![9, 10]),
    None,
    Some(vec![13, 14]),
    None,
];
let array = FixedSizeBinaryArray::try_from_sparse_iter(input_arg.into_iter()).unwrap();

Errors

Returns error if argument has length zero, or sizes of nested slices don’t match.

Create an array from an iterable argument of byte slices.

Examples

use arrow::array::FixedSizeBinaryArray;
let input_arg = vec![
    vec![1, 2],
    vec![3, 4],
    vec![5, 6],
];
let array = FixedSizeBinaryArray::try_from_iter(input_arg.into_iter()).unwrap();

Errors

Returns error if argument has length zero, or sizes of nested slices don’t match.

Trait Implementations

Returns the total number of bytes of memory occupied by the buffers owned by this FixedSizeBinaryArray.

Returns the total number of bytes of memory occupied physically by this FixedSizeBinaryArray.

Returns the array as Any so that it can be downcasted to a specific implementation. Read more

Returns a reference to the underlying data of this array.

Returns a reference-counted pointer to the underlying data of this array.

Returns a reference to the DataType of this array. Read more

Returns a zero-copy slice of this array with the indicated offset and length. Read more

Returns the length (i.e., number of elements) of this array. Read more

Returns whether this array is empty. Read more

Returns the offset into the underlying data used by this array(-slice). Note that the underlying data can be shared by many arrays. This defaults to 0. Read more

Returns whether the element at index is null. When using this function on a slice, the index is relative to the slice. Read more

Returns whether the element at index is not null. When using this function on a slice, the index is relative to the slice. Read more

Returns the total number of null values in this array. Read more

returns two pointers that represent this array in the C Data Interface (FFI)

Formats the value using the given formatter. Read more

Performs the conversion.

Creates a FixedSizeBinaryArray from FixedSizeList<u8> array

Performs the conversion.

Checks whether arrow array equals to json array.

Checks whether arrow array equals to json array.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.