pub trait OffsetType:
Copy
+ Default
+ PartialOrd
+ Sub<Output = Self> {
const SIZE: usize;
// Required methods
fn from_usize(value: usize) -> Option<Self>;
fn to_usize(self) -> usize;
}Expand description
Trait for offset types used in CharsTape.
Implementations: i32/i64 (Arrow-compatible), u32/u64 (unsigned, no Arrow interop).
Required Associated Constants§
Required Methods§
Sourcefn from_usize(value: usize) -> Option<Self>
fn from_usize(value: usize) -> Option<Self>
Convert a usize value to this offset type.
Returns None if the value is too large to be represented by this offset type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.