parquet::data_type

Struct Int96

Source
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

Source

pub fn new() -> Self

Creates new INT96 type struct with no data set.

Source

pub fn data(&self) -> &[u32]

Returns underlying data as slice of u32.

Source

pub fn set_data(&mut self, elem0: u32, elem1: u32, elem2: u32)

Sets data for this INT96 type.

Source

pub fn to_i64(&self) -> i64

Converts this INT96 into an i64 representing the number of MILLISECONDS since Epoch

Source

pub fn to_nanos(&self) -> i64

Converts this INT96 into an i64 representing the number of NANOSECONDS since EPOCH

Will wrap around on overflow

Source

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 AsBytes for Int96

Source§

fn as_bytes(&self) -> &[u8]

Returns slice of bytes for this data type.
Source§

impl Clone for Int96

Source§

fn clone(&self) -> Int96

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Int96

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Int96

Source§

fn default() -> Int96

Returns the “default value” for a type. Read more
Source§

impl Display for Int96

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Vec<u32>> for Int96

Source§

fn from(buf: Vec<u32>) -> Self

Converts to this type from the input type.
Source§

impl HeapSize for Int96

Source§

fn heap_size(&self) -> usize

Return the size of any bytes allocated on the heap by this object, including heap memory in those structures Read more
Source§

impl MakeStatistics for Int96

Source§

fn make_statistics(statistics: ValueStatistics<Self>) -> Statistics
where Self: Sized,

Source§

impl ParquetValueType for Int96

Source§

const PHYSICAL_TYPE: Type = Type::INT96

Source§

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)

Establish the data that will be decoded in a buffer
Source§

fn decode( buffer: &mut [Self], decoder: &mut PlainDecoderDetails, ) -> Result<usize>

Decode the value from a given buffer for a higher level decoder
Source§

fn skip(decoder: &mut PlainDecoderDetails, num_values: usize) -> Result<usize>

Source§

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

Return the value as an mutable Any to allow for downcasts without transmutation
Source§

fn dict_encoding_size(&self) -> (usize, usize)

Return the encoded size for a type
Source§

fn variable_length_bytes(_: &[Self]) -> Option<i64>

Return the number of variable length bytes in a given slice of data Read more
Source§

fn as_i64(&self) -> Result<i64>

Return the value as i64 if possible Read more
Source§

fn as_u64(&self) -> Result<u64>

Return the value as u64 if possible Read more
Source§

fn set_from_bytes(&mut self, _data: Bytes)

Sets the value of this object from the provided [Bytes] Read more
Source§

impl PartialEq for Int96

Source§

fn eq(&self, other: &Int96) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Int96

Source§

fn partial_cmp(&self, other: &Int96) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl SliceAsBytes for Int96

Source§

fn slice_as_bytes(_self: &[Self]) -> &[u8]

Returns slice of bytes for a slice of this data type.
Source§

unsafe fn slice_as_bytes_mut(_self: &mut [Self]) -> &mut [u8]

Return the internal representation as a mutable slice Read more
Source§

impl Copy for Int96

Source§

impl Eq for Int96

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T