pub trait AltLogicalData: AltrepLen {
// Required method
fn elt(&self, i: usize) -> Logical;
// Provided methods
fn as_r_slice(&self) -> Option<&[i32]> { ... }
fn get_region(&self, start: usize, len: usize, buf: &mut [i32]) -> usize { ... }
fn is_sorted(&self) -> Option<Sortedness> { ... }
fn no_na(&self) -> Option<bool> { ... }
fn sum(&self, _na_rm: bool) -> Option<i64> { ... }
}Expand description
Trait for types that can back an ALTLOGICAL vector.
Required Methods§
Provided Methods§
Sourcefn as_r_slice(&self) -> Option<&[i32]>
fn as_r_slice(&self) -> Option<&[i32]>
Optional: return a slice if data is contiguous i32 (R’s internal format).
When present, the generated element callback reads this storage directly, preserving raw nonzero values as well as the NA sentinel.
Sourcefn get_region(&self, start: usize, len: usize, buf: &mut [i32]) -> usize
fn get_region(&self, start: usize, len: usize, buf: &mut [i32]) -> usize
Optional: bulk read into buffer (clamped to available data).
The buffer is R’s native logical storage (i32: 0, 1, or
NA_LOGICAL). Same contract and override guidance as
AltIntegerData::get_region.
Sourcefn is_sorted(&self) -> Option<Sortedness>
fn is_sorted(&self) -> Option<Sortedness>
Optional: sortedness hint.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".