pub struct Int96 {
value: [u32; 3],
}
Expand description
Rust representation for logical type INT96, value is backed by an array of u32
.
The type only takes 12 bytes, without extra padding.
Fields§
§value: [u32; 3]
Implementations§
Source§impl Int96
impl Int96
Sourcepub fn to_i64(&self) -> i64
pub fn to_i64(&self) -> i64
Converts this INT96 into an i64 representing the number of MILLISECONDS since Epoch
Sourcepub fn to_nanos(&self) -> i64
pub fn to_nanos(&self) -> i64
Converts this INT96 into an i64 representing the number of NANOSECONDS since EPOCH
Will wrap around on overflow
Sourcepub fn to_seconds_and_nanos(&self) -> (i64, i64)
pub fn to_seconds_and_nanos(&self) -> (i64, i64)
Converts this INT96 to a number of seconds and nanoseconds since EPOCH
Trait Implementations§
Source§impl MakeStatistics for Int96
impl MakeStatistics for Int96
fn make_statistics(statistics: ValueStatistics<Self>) -> Statisticswhere
Self: Sized,
Source§impl ParquetValueType for Int96
impl ParquetValueType for Int96
const PHYSICAL_TYPE: Type = Type::INT96
Source§fn encode<W: Write>(
values: &[Self],
writer: &mut W,
_: &mut BitWriter,
) -> Result<()>
fn encode<W: Write>( values: &[Self], writer: &mut W, _: &mut BitWriter, ) -> Result<()>
Encode the value directly from a higher level encoder
Source§fn set_data(decoder: &mut PlainDecoderDetails, data: Bytes, num_values: usize)
fn set_data(decoder: &mut PlainDecoderDetails, data: Bytes, num_values: usize)
Establish the data that will be decoded in a buffer
Source§fn decode(
buffer: &mut [Self],
decoder: &mut PlainDecoderDetails,
) -> Result<usize>
fn decode( buffer: &mut [Self], decoder: &mut PlainDecoderDetails, ) -> Result<usize>
Decode the value from a given buffer for a higher level decoder
fn skip(decoder: &mut PlainDecoderDetails, num_values: usize) -> Result<usize>
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Return the value as an Any to allow for downcasts without transmutation
Source§fn as_mut_any(&mut self) -> &mut dyn Any
fn as_mut_any(&mut self) -> &mut dyn Any
Return the value as an mutable Any to allow for downcasts without transmutation
Source§fn dict_encoding_size(&self) -> (usize, usize)
fn dict_encoding_size(&self) -> (usize, usize)
Return the encoded size for a type
Source§fn variable_length_bytes(_: &[Self]) -> Option<i64>
fn variable_length_bytes(_: &[Self]) -> Option<i64>
Return the number of variable length bytes in a given slice of data Read more
Source§fn set_from_bytes(&mut self, _data: Bytes)
fn set_from_bytes(&mut self, _data: Bytes)
Sets the value of this object from the provided [
Bytes
] Read moreSource§impl PartialOrd for Int96
impl PartialOrd for Int96
Source§impl SliceAsBytes for Int96
impl SliceAsBytes for Int96
impl Copy for Int96
impl Eq for Int96
impl StructuralPartialEq for Int96
Auto Trait Implementations§
impl Freeze for Int96
impl RefUnwindSafe for Int96
impl Send for Int96
impl Sync for Int96
impl Unpin for Int96
impl UnwindSafe for Int96
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more