Skip to main content

ExcelArray

Struct ExcelArray 

Source
pub struct ExcelArray { /* private fields */ }
Expand description

Owned immutable rectangular array in row-major order.

Implementations§

Source§

impl ExcelArray

Source

pub fn from_borrowed(value: ExcelValueRef<'_>) -> Result<Self, ConversionError>

Deep-copies a callback multi using ConversionLimits::default.

Source

pub fn from_borrowed_with_limits( value: ExcelValueRef<'_>, limits: &ConversionLimits, ) -> Result<Self, ConversionError>

Deep-copies a callback multi after checking shape and all configured limits before allocating destination storage.

Source§

impl ExcelArray

Source

pub fn new( rows: usize, columns: usize, values: impl Into<Box<[ExcelValue]>>, ) -> Result<Self, OwnedValueError>

Creates a rectangular row-major array.

Returns an error when rows * columns overflows, the element count does not match the shape, or an element is itself an array.

Source

pub const fn rows(&self) -> usize

Returns the number of rows.

Source

pub const fn columns(&self) -> usize

Returns the number of columns.

Source

pub const fn len(&self) -> usize

Returns the total row-major element count.

Source

pub const fn is_empty(&self) -> bool

Reports whether the array contains no elements.

Source

pub fn values(&self) -> &[ExcelValue]

Returns all values in row-major order.

Source

pub fn get(&self, row: usize, column: usize) -> Option<&ExcelValue>

Returns the value at a zero-based row and column, if in bounds.

Source

pub fn row(&self, row: usize) -> Option<&[ExcelValue]>

Returns one zero-based row as a contiguous row-major slice.

Source

pub fn column(&self, column: usize) -> Option<ExcelArrayColumn<'_>>

Returns an iterator over one zero-based column, if in bounds.

Source

pub fn iter(&self) -> Iter<'_, ExcelValue> ⓘ

Iterates all values in row-major order.

Trait Implementations§

Source§

impl Clone for ExcelArray

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExcelArray

Source§

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

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

impl From<ExcelArray> for ExcelReturnValue

Source§

fn from(value: ExcelArray) -> Self

Converts to this type from the input type.
Source§

impl From<ExcelArray> for ExcelReturnArray

Source§

fn from(value: ExcelArray) -> Self

Converts to this type from the input type.
Source§

impl<'call> FromExcel<'call> for ExcelArray

Source§

fn from_excel(value: ExcelValueRef<'call>) -> Result<Self, ConversionError>

Converts a callback-borrowed value without invoking Excel coercion. Read more
Source§

impl IntoExcel for ExcelArray

Source§

fn into_excel(self) -> Result<ExcelValue, ConversionError>

Produces an owned semantic Excel value suitable for later return planning.
Source§

impl PartialEq for ExcelArray

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ExcelArray

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.