Struct aztro_core::Timestamp
source · pub struct Timestamp { /* private fields */ }Implementations§
source§impl Timestamp
impl Timestamp
pub fn new( year: i32, month: u32, day: u32, hour: u32, minute: u32, second: u32, ) -> Self
pub fn from_utc( year: i32, month: u32, day: u32, hour: u32, minute: u32, second: u32, ) -> Self
pub fn from_local( year: i32, month: u32, day: u32, hour: u32, minute: u32, second: u32, timezone_offset: i32, ) -> Self
pub fn to_julian_day(&self) -> f64
pub fn from_julian_day(jd: f64) -> Self
pub fn add_minutes(&self, minutes: i32) -> Self
pub fn fractional_hour(&self) -> f64
Trait Implementations§
source§impl<'de> Deserialize<'de> for Timestamp
impl<'de> Deserialize<'de> for Timestamp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Timestamp
impl Eq for Timestamp
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)