pub struct ExcelArray { /* private fields */ }Expand description
Owned immutable rectangular array in row-major order.
Implementations§
Source§impl ExcelArray
impl ExcelArray
Sourcepub fn from_borrowed(value: ExcelValueRef<'_>) -> Result<Self, ConversionError>
pub fn from_borrowed(value: ExcelValueRef<'_>) -> Result<Self, ConversionError>
Deep-copies a callback multi using ConversionLimits::default.
Sourcepub fn from_borrowed_with_limits(
value: ExcelValueRef<'_>,
limits: &ConversionLimits,
) -> Result<Self, ConversionError>
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
impl ExcelArray
Sourcepub fn new(
rows: usize,
columns: usize,
values: impl Into<Box<[ExcelValue]>>,
) -> Result<Self, OwnedValueError>
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.
Sourcepub fn values(&self) -> &[ExcelValue]
pub fn values(&self) -> &[ExcelValue]
Returns all values in row-major order.
Sourcepub fn get(&self, row: usize, column: usize) -> Option<&ExcelValue>
pub fn get(&self, row: usize, column: usize) -> Option<&ExcelValue>
Returns the value at a zero-based row and column, if in bounds.
Sourcepub fn row(&self, row: usize) -> Option<&[ExcelValue]>
pub fn row(&self, row: usize) -> Option<&[ExcelValue]>
Returns one zero-based row as a contiguous row-major slice.
Sourcepub fn column(&self, column: usize) -> Option<ExcelArrayColumn<'_>>
pub fn column(&self, column: usize) -> Option<ExcelArrayColumn<'_>>
Returns an iterator over one zero-based column, if in bounds.
Sourcepub fn iter(&self) -> Iter<'_, ExcelValue> ⓘ
pub fn iter(&self) -> Iter<'_, ExcelValue> ⓘ
Iterates all values in row-major order.
Trait Implementations§
Source§impl Clone for ExcelArray
impl Clone for ExcelArray
Source§impl Debug for ExcelArray
impl Debug for ExcelArray
Source§impl From<ExcelArray> for ExcelReturnValue
impl From<ExcelArray> for ExcelReturnValue
Source§fn from(value: ExcelArray) -> Self
fn from(value: ExcelArray) -> Self
Converts to this type from the input type.
Source§impl From<ExcelArray> for ExcelReturnArray
impl From<ExcelArray> for ExcelReturnArray
Source§fn from(value: ExcelArray) -> Self
fn from(value: ExcelArray) -> Self
Converts to this type from the input type.
Source§impl<'call> FromExcel<'call> for ExcelArray
impl<'call> FromExcel<'call> for ExcelArray
Source§fn from_excel(value: ExcelValueRef<'call>) -> Result<Self, ConversionError>
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
impl IntoExcel for ExcelArray
Source§fn into_excel(self) -> Result<ExcelValue, ConversionError>
fn into_excel(self) -> Result<ExcelValue, ConversionError>
Produces an owned semantic Excel value suitable for later return planning.
Source§impl PartialEq for ExcelArray
impl PartialEq for ExcelArray
impl StructuralPartialEq for ExcelArray
Auto Trait Implementations§
impl Freeze for ExcelArray
impl RefUnwindSafe for ExcelArray
impl Send for ExcelArray
impl Sync for ExcelArray
impl Unpin for ExcelArray
impl UnsafeUnpin for ExcelArray
impl UnwindSafe for ExcelArray
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more