pub enum IntegerStorage {
I8(Vec<i8>),
I16(Vec<i16>),
I32(Vec<i32>),
I64(Vec<i64>),
U8(Vec<u8>),
U16(Vec<u16>),
U32(Vec<u32>),
U64(Vec<u64>),
}Expand description
Exact homogeneous backing storage for MATLAB integer arrays.
This deliberately stores each class in its native Rust representation so
int64 and uint64 values never round through f64 before an
integer-aware runtime path consumes them.
Variants§
I8(Vec<i8>)
I16(Vec<i16>)
I32(Vec<i32>)
I64(Vec<i64>)
U8(Vec<u8>)
U16(Vec<u16>)
U32(Vec<u32>)
U64(Vec<u64>)
Implementations§
Source§impl IntegerStorage
impl IntegerStorage
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn class_name(&self) -> &'static str
pub fn to_f64_vec(&self) -> Vec<f64>
Sourcepub fn value_at(&self, index: usize) -> Option<IntValue>
pub fn value_at(&self, index: usize) -> Option<IntValue>
Returns an exact scalar from this homogeneous buffer.
Sourcepub fn zeros_like(&self, len: usize) -> Self
pub fn zeros_like(&self, len: usize) -> Self
Allocates zeros while preserving this integer class.
Trait Implementations§
Source§impl Clone for IntegerStorage
impl Clone for IntegerStorage
Source§fn clone(&self) -> IntegerStorage
fn clone(&self) -> IntegerStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IntegerStorage
impl Debug for IntegerStorage
Source§impl PartialEq for IntegerStorage
impl PartialEq for IntegerStorage
impl StructuralPartialEq for IntegerStorage
Auto Trait Implementations§
impl Freeze for IntegerStorage
impl RefUnwindSafe for IntegerStorage
impl Send for IntegerStorage
impl Sync for IntegerStorage
impl Unpin for IntegerStorage
impl UnsafeUnpin for IntegerStorage
impl UnwindSafe for IntegerStorage
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