polars_arrow/types/offset.rs
1use super::Index;
2
3/// Sealed trait describing the subset (`i32` and `i64`) of [`Index`] that can be used
4/// as offsets of variable-length Arrow arrays.
5pub trait Offset: super::private::Sealed + Index {
6 /// Whether it is `i32` (false) or `i64` (true).
7 const IS_LARGE: bool;
8}
9
10impl Offset for i32 {
11 const IS_LARGE: bool = false;
12}
13
14impl Offset for i64 {
15 const IS_LARGE: bool = true;
16}