Struct ella_common::time::Time

source ·
pub struct Time(_);

Implementations§

source§

impl Time

source

pub fn now() -> Self

source

pub fn timestamp(&self) -> i64

source

pub fn from_timestamp(t: i64) -> Self

Trait Implementations§

source§

impl Add<Duration> for Time

§

type Output = Time

The resulting type after applying the + operator.
source§

fn add(self, rhs: Duration) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign<Duration> for Time

source§

fn add_assign(&mut self, rhs: Duration)

Performs the += operation. Read more
source§

impl Clone for Time

source§

fn clone(&self) -> Time

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 Time

source§

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

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

impl<'de> Deserialize<'de> for Time

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Time

source§

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

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

impl From<OffsetDateTime> for Time

source§

fn from(original: OffsetDateTime) -> Time

Converts to this type from the input type.
source§

impl From<Time> for OffsetDateTime

source§

fn from(original: Time) -> Self

Converts to this type from the input type.
source§

impl Hash for Time

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Time

source§

fn cmp(&self, other: &Time) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Time> for Time

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Time> for Time

source§

fn partial_cmp(&self, other: &Time) -> 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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Time

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Sub<Duration> for Time

§

type Output = Time

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Duration) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<Time> for Time

§

type Output = Duration

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl SubAssign<Duration> for Time

source§

fn sub_assign(&mut self, rhs: Duration)

Performs the -= operation. Read more
source§

impl TensorValue for Time

§

type Array = PrimitiveArray<TimestampNanosecondType>

Arrow array type used to store raw values.
§

type Masked = Option<Time>

Masked value type. For Option<T> this is Option<T>. For all other T this should be Option<T>.
§

type Unmasked = Time

Unmasked value type. For Option shis is T. For all other T this should be T.
source§

const TENSOR_TYPE: TensorType = TensorType::Timestamp

source§

const NULLABLE: bool = false

Whether this type is nullable/maskable. Should be false for all types except Option<T>.
source§

fn value(array: &Self::Array, i: usize) -> Self

Returns the value at index i in array. Panics if i >= array.len().
source§

unsafe fn value_unchecked(array: &Self::Array, i: usize) -> Self

Returns the value at index i without bounds checking. Read more
source§

fn to_masked(value: Self) -> Self::Masked

Wrap value in its masked type. Read more
source§

fn to_unmasked(value: Self) -> Self::Unmasked

Unwrap the inner value from its masked type. Read more
source§

fn from_iter_masked<I>(iter: I) -> Self::Arraywhere I: IntoIterator<Item = Self::Masked>,

Constructs an array from an iterator of masked values.
source§

fn from_vec(values: Vec<Self>) -> Self::Array

source§

unsafe fn from_trusted_len_iter_masked<I>(iter: I) -> Self::Arraywhere I: IntoIterator<Item = Self::Masked>,

Constructs an array from an iterator of masked values. Read more
source§

fn slice(array: &Self::Array, offset: usize, length: usize) -> Self::Array

Returns a slice of array from offset to offset + length. Read more
source§

fn from_array_data(data: ArrayData) -> Self::Array

Constructs an array from [ArrowData]. Read more
source§

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

Writes the value of self to formatter f.
source§

fn from_iter<I>(iter: I) -> Self::Arraywhere I: IntoIterator<Item = Self>,

Constructs an array from an iterator of values.
source§

unsafe fn from_trusted_len_iter<I>(iter: I) -> Self::Arraywhere I: IntoIterator<Item = Self>,

Constructs an array from an iterator of values. Read more
source§

impl Copy for Time

source§

impl Eq for Time

source§

impl StructuralEq for Time

source§

impl StructuralPartialEq for Time

Auto Trait Implementations§

§

impl RefUnwindSafe for Time

§

impl Send for Time

§

impl Sync for Time

§

impl Unpin for Time

§

impl UnwindSafe for Time

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere 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<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

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

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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> RowFormat for Twhere T: TensorValue,

source§

const COLUMNS: usize = 1usize

§

type Builder = ScalarBuilder<T>

§

type View = ScalarRowView<T>

source§

fn builder( fields: &[Arc<Field, Global>] ) -> Result<<T as RowFormat>::Builder, Error>

source§

fn view( rows: usize, _fields: &[Arc<Field, Global>], arrays: &[Arc<dyn Array, Global>] ) -> Result<<T as RowFormat>::View, Error>

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> TensorOp<Option<T>> for Twhere T: TensorValue<Unmasked = T, Masked = Option<T>>, Option<T>: TensorValue<Unmasked = T>,

§

type Output<Out> = Option<Out>

source§

fn apply<F, O>( self, other: Option<T>, op: F ) -> <T as TensorOp<Option<T>>>::Output<O>where F: Fn(<T as TensorValue>::Unmasked, <Option<T> as TensorValue>::Unmasked) -> O, O: TensorValue, <T as TensorOp<Option<T>>>::Output<O>: TensorValue,

source§

impl<T> TensorOp<T> for Twhere T: TensorValue<Unmasked = T>,

§

type Output<Out> = Out

source§

fn apply<F, O>(self, other: T, op: F) -> <T as TensorOp<T>>::Output<O>where F: Fn(<T as TensorValue>::Unmasked, <T as TensorValue>::Unmasked) -> O, <T as TensorOp<T>>::Output<O>: TensorValue,

source§

impl<T> TensorUnaryOp for Twhere T: TensorValue<Unmasked = T, Masked = Option<T>>,

§

type Output<Out> = Out

source§

fn apply<F, O>(self, op: F) -> <T as TensorUnaryOp>::Output<O>where F: Fn(<T as TensorValue>::Unmasked) -> O, O: TensorValue, <T as TensorUnaryOp>::Output<O>: TensorValue,

source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

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

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

source§

impl<N> NodeTrait for Nwhere N: Copy + Ord + Hash,