Skip to content
API REFERENCEUsage guides →

cellpack::scans::Offsets ​

enum

Module contract · All interfaces

At a glance ​

pub enum Offsets<'a> {
    U32(&'a [u32]),
    U64(&'a [u64]),
    I32(&'a [i32]),
    I64(&'a [i64]),
}

Borrowed inputs, selections and encoding options. Borrowed CSR row offsets; signed inputs are checked before indexing.

Fields and variants ​

U32 ​

U32(&'a [u32])

32-bit offsets.

U64 ​

U64(&'a [u64])

64-bit offsets.

I32 ​

I32(&'a [i32])

Signed 32-bit offsets; negative entries are rejected.

I64 ​

I64(&'a [i64])

Signed 64-bit offsets; negative entries are rejected.

Member index ​

3 of 3 members

  • lenNumber of offsets, one more than the rows they describe.
  • is_emptyWhether there is no offset, i.e. no row.
  • getOffset i as an unsigned value; a negative entry is an error.

Methods and associated constants ​

len ​

pub fn len(&self) -> usize

Number of offsets, one more than the rows they describe.

is_empty ​

pub fn is_empty(&self) -> bool

Whether there is no offset, i.e. no row.

get ​

pub fn get(&self, i: usize) -> Result<u64>

Offset i as an unsigned value; a negative entry is an error.

Implemented traits ​

impl<'a> Clone for Offsets<'a>
impl<'a> Debug for Offsets<'a>

Contract reference ​

See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.

Definition