Struct packedtime_rs::PackedTimestamp
source · [−]#[repr(transparent)]pub struct PackedTimestamp { /* private fields */ }
Implementations
sourceimpl 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
sourceimpl Clone for PackedTimestamp
impl Clone for PackedTimestamp
sourcefn clone(&self) -> PackedTimestamp
fn clone(&self) -> PackedTimestamp
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PackedTimestamp
impl Debug for PackedTimestamp
sourceimpl Display for PackedTimestamp
impl Display for PackedTimestamp
sourceimpl From<EpochDays> for PackedTimestamp
impl From<EpochDays> for PackedTimestamp
sourceimpl FromStr for PackedTimestamp
impl FromStr for PackedTimestamp
sourceimpl Ord for PackedTimestamp
impl Ord for PackedTimestamp
sourcefn cmp(&self, other: &PackedTimestamp) -> Ordering
fn cmp(&self, other: &PackedTimestamp) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<PackedTimestamp> for PackedTimestamp
impl PartialEq<PackedTimestamp> for PackedTimestamp
sourcefn 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 ==
. Read more
sourceimpl PartialOrd<PackedTimestamp> for PackedTimestamp
impl PartialOrd<PackedTimestamp> for PackedTimestamp
sourcefn partial_cmp(&self, other: &PackedTimestamp) -> Option<Ordering>
fn partial_cmp(&self, other: &PackedTimestamp) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
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 · sourcefn 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
sourceimpl TryFrom<&str> for PackedTimestamp
impl TryFrom<&str> for PackedTimestamp
impl Copy for PackedTimestamp
impl Eq for PackedTimestamp
impl StructuralEq for PackedTimestamp
impl StructuralPartialEq for PackedTimestamp
Auto Trait Implementations
impl RefUnwindSafe for PackedTimestamp
impl Send for PackedTimestamp
impl Sync for PackedTimestamp
impl Unpin for PackedTimestamp
impl UnwindSafe for PackedTimestamp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more