pub struct OrbitTime(pub Time);Expand description
Type-safe time wrapper.
Tuple Fields§
§0: TimeImplementations§
Source§impl OrbitTime
impl OrbitTime
Sourcepub fn from_seconds(s: f64) -> Self
pub fn from_seconds(s: f64) -> Self
Create from seconds.
Sourcepub fn from_years(y: f64) -> Self
pub fn from_years(y: f64) -> Self
Create from years (Julian years).
Sourcepub fn as_seconds(&self) -> f64
pub fn as_seconds(&self) -> f64
Get value in seconds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OrbitTime
impl<'de> Deserialize<'de> for OrbitTime
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
Source§impl Div<OrbitTime> for Position3D
Velocity = Position / Time (dimensional operation).
impl Div<OrbitTime> for Position3D
Velocity = Position / Time (dimensional operation).
Source§type Output = Velocity3D
type Output = Velocity3D
The resulting type after applying the
/ operator.Source§impl Mul<OrbitTime> for Acceleration3D
Velocity = Acceleration * Time (dimensional operation).
impl Mul<OrbitTime> for Acceleration3D
Velocity = Acceleration * Time (dimensional operation).
Source§type Output = Velocity3D
type Output = Velocity3D
The resulting type after applying the
* operator.Source§impl Mul<OrbitTime> for Velocity3D
Position = Velocity * Time (dimensional operation).
impl Mul<OrbitTime> for Velocity3D
Position = Velocity * Time (dimensional operation).
Source§type Output = Position3D
type Output = Position3D
The resulting type after applying the
* operator.Source§impl PartialOrd for OrbitTime
impl PartialOrd for OrbitTime
impl Copy for OrbitTime
impl StructuralPartialEq for OrbitTime
Auto Trait Implementations§
impl Freeze for OrbitTime
impl RefUnwindSafe for OrbitTime
impl Send for OrbitTime
impl Sync for OrbitTime
impl Unpin for OrbitTime
impl UnsafeUnpin for OrbitTime
impl UnwindSafe for OrbitTime
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