pub enum RefProjection {
TypedField {
type_id: u16,
field_idx: u16,
field_type_tag: u16,
},
Index {
index: ValueWord,
},
MatrixRow {
row_index: u32,
},
}Expand description
A projection applied to a base reference.
Variants§
TypedField
Index
Index projection: &arr[i] — the index is stored as a NaN-boxed value
so it can be an int or string key at runtime.
MatrixRow
Matrix row projection: &mut m[i] — borrow-based row projection for
write-through mutation. The row_index identifies which row of the
matrix is borrowed. Reads through this ref return a FloatArraySlice;
writes via SetIndexRef do COW Arc::make_mut on the MatrixData
and update matrix.data[row_index * cols + col_index] in place.
Trait Implementations§
Source§impl Clone for RefProjection
impl Clone for RefProjection
Source§fn clone(&self) -> RefProjection
fn clone(&self) -> RefProjection
Returns a duplicate of the value. Read more
1.0.0 · 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 RefProjection
impl Debug for RefProjection
Source§impl PartialEq for RefProjection
impl PartialEq for RefProjection
impl Eq for RefProjection
impl StructuralPartialEq for RefProjection
Auto Trait Implementations§
impl Freeze for RefProjection
impl RefUnwindSafe for RefProjection
impl Send for RefProjection
impl Sync for RefProjection
impl Unpin for RefProjection
impl UnsafeUnpin for RefProjection
impl UnwindSafe for RefProjection
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