pub struct TimestampValue { /* private fields */ }Implementations§
Source§impl TimestampValue
impl TimestampValue
pub fn new(unix_nano: i64, tz: Option<String>) -> TimestampValue
pub fn to_naive_datetime(&self) -> NaiveDateTime
pub fn to_fixed_datetime(&self) -> Result<DateTime<Tz>>
pub fn tz_ref(&self) -> &Option<String>
pub fn get_time_stamp(&self) -> i64
Trait Implementations§
Source§impl Clone for TimestampValue
impl Clone for TimestampValue
Source§fn clone(&self) -> TimestampValue
fn clone(&self) -> TimestampValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimestampValue
impl Debug for TimestampValue
Source§impl Display for TimestampValue
impl Display for TimestampValue
Source§impl FromProtocolValue for TimestampValue
impl FromProtocolValue for TimestampValue
Source§fn from_text(raw: &[u8]) -> Result<Self, ProtocolError>
fn from_text(raw: &[u8]) -> Result<Self, ProtocolError>
Decodes raw value to native type in text format
Source§fn from_binary(raw: &[u8]) -> Result<Self, ProtocolError>
fn from_binary(raw: &[u8]) -> Result<Self, ProtocolError>
Decodes raw value to native type in binary format
fn from_protocol(raw: &[u8], format: Format) -> Result<Self, ProtocolError>where
Self: Sized,
Source§impl Hash for TimestampValue
impl Hash for TimestampValue
Source§impl Ord for TimestampValue
impl Ord for TimestampValue
Source§fn cmp(&self, other: &TimestampValue) -> Ordering
fn cmp(&self, other: &TimestampValue) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TimestampValue
impl PartialEq for TimestampValue
Source§fn eq(&self, other: &TimestampValue) -> bool
fn eq(&self, other: &TimestampValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for TimestampValue
impl PartialOrd for TimestampValue
Source§impl ToProtocolValue for TimestampValue
impl ToProtocolValue for TimestampValue
Source§fn to_text(&self, buf: &mut BytesMut) -> Result<(), ProtocolError>
fn to_text(&self, buf: &mut BytesMut) -> Result<(), ProtocolError>
Converts native type to raw value in text format
Source§fn to_binary(&self, buf: &mut BytesMut) -> Result<(), ProtocolError>
fn to_binary(&self, buf: &mut BytesMut) -> Result<(), ProtocolError>
Converts native type to raw value in binary format
fn to_protocol(
&self,
buf: &mut BytesMut,
format: Format,
) -> Result<(), ProtocolError>where
Self: Sized,
impl Eq for TimestampValue
impl StructuralPartialEq for TimestampValue
Auto Trait Implementations§
impl Freeze for TimestampValue
impl RefUnwindSafe for TimestampValue
impl Send for TimestampValue
impl Sync for TimestampValue
impl Unpin for TimestampValue
impl UnsafeUnpin for TimestampValue
impl UnwindSafe for TimestampValue
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