pub struct EnvironmentSample { /* private fields */ }Expand description
Environment resolved for one point and instant.
Values, not sources: built from whichever models are available and passed to
calculations that need no port. Unresolved quantities are None, never
zero.
Implementations§
Source§impl EnvironmentSample
impl EnvironmentSample
Sourcepub const fn at(point: GeodeticPoint, when: Instant<Utc>) -> Self
pub const fn at(point: GeodeticPoint, when: Instant<Utc>) -> Self
Empty sample for point at when.
Sourcepub const fn with_magnetic(self, field: MagneticField) -> Self
pub const fn with_magnetic(self, field: MagneticField) -> Self
Sets the magnetic field.
Sourcepub const fn with_current(self, current: Current) -> Self
pub const fn with_current(self, current: Current) -> Self
Sets the current.
Sourcepub const fn with_tide(self, height: Distance) -> Self
pub const fn with_tide(self, height: Distance) -> Self
Sets the height of tide above chart datum.
Where there is no tide, set Distance::ZERO: an unset tide means “not
asked”, and calculations needing it report that instead of assuming
zero.
Sourcepub const fn point(&self) -> GeodeticPoint
pub const fn point(&self) -> GeodeticPoint
Point of the sample.
Sourcepub const fn magnetic(&self) -> Option<MagneticField>
pub const fn magnetic(&self) -> Option<MagneticField>
Magnetic field, if resolved.
Trait Implementations§
Source§impl Clone for EnvironmentSample
impl Clone for EnvironmentSample
impl Copy for EnvironmentSample
Source§impl Debug for EnvironmentSample
impl Debug for EnvironmentSample
Source§impl PartialEq for EnvironmentSample
impl PartialEq for EnvironmentSample
impl StructuralPartialEq for EnvironmentSample
Auto Trait Implementations§
impl Freeze for EnvironmentSample
impl RefUnwindSafe for EnvironmentSample
impl Send for EnvironmentSample
impl Sync for EnvironmentSample
impl Unpin for EnvironmentSample
impl UnsafeUnpin for EnvironmentSample
impl UnwindSafe for EnvironmentSample
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