Struct packedtime_rs::PackedTimestamp
source · #[repr(transparent)]pub struct PackedTimestamp { /* private fields */ }Implementations§
source§impl PackedTimestamp
impl PackedTimestamp
pub fn new_utc( year: i32, month: u32, day: u32, hour: u32, minute: u32, second: u32, milli: u32 ) -> Self
pub fn new_ymd_utc(year: i32, month: u32, day: u32) -> Self
pub fn new( year: i32, month: u32, day: u32, hour: u32, minute: u32, second: u32, milli: u32, offset_minutes: i32 ) -> Self
pub fn from_value(value: u64) -> Self
pub fn value(&self) -> u64
pub fn from_timestamp_millis(ts: i64) -> Self
pub fn to_timestamp_millis(&self) -> i64
pub fn from_rfc3339_bytes(input: &[u8]) -> ParseResult<Self>
pub fn from_rfc3339_str(input: &str) -> ParseResult<Self>
pub fn year(&self) -> u32
pub fn month(&self) -> u32
pub fn day(&self) -> u32
pub fn hour(&self) -> u32
pub fn minute(&self) -> u32
pub fn second(&self) -> u32
pub fn millisecond(&self) -> u32
pub fn offset_minutes(&self) -> i32
pub fn write_rfc3339_bytes<W: Write>(&self, writer: W) -> Result<()>
pub fn write_rfc3339_str<W: Write>(&self, writer: W) -> Result
pub fn to_rfc3339_bytes(&self) -> [u8; 24]
pub fn to_rfc3339_string(&self) -> String
Trait Implementations§
source§impl Clone for PackedTimestamp
impl Clone for PackedTimestamp
source§fn clone(&self) -> PackedTimestamp
fn clone(&self) -> PackedTimestamp
Returns a copy of the value. Read more
1.0.0 · 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 PackedTimestamp
impl Debug for PackedTimestamp
source§impl Display for PackedTimestamp
impl Display for PackedTimestamp
source§impl From<EpochDays> for PackedTimestamp
impl From<EpochDays> for PackedTimestamp
source§impl FromStr for PackedTimestamp
impl FromStr for PackedTimestamp
source§impl Ord for PackedTimestamp
impl Ord for PackedTimestamp
source§fn cmp(&self, other: &PackedTimestamp) -> Ordering
fn cmp(&self, other: &PackedTimestamp) -> Ordering
1.21.0 · 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<PackedTimestamp> for PackedTimestamp
impl PartialEq<PackedTimestamp> for PackedTimestamp
source§fn eq(&self, other: &PackedTimestamp) -> bool
fn eq(&self, other: &PackedTimestamp) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<PackedTimestamp> for PackedTimestamp
impl PartialOrd<PackedTimestamp> for PackedTimestamp
source§fn partial_cmp(&self, other: &PackedTimestamp) -> Option<Ordering>
fn partial_cmp(&self, other: &PackedTimestamp) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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