pub struct SpiceLock { /* private fields */ }
lock
only.Expand description
A wrapper singleton struct around the API to prevent concurrent calls to SPICE functions from multiple threads.
Exposes all functions as methods with identical signatures besides the added &self
argument.
Only available with the lock
feature enabled.
Implementations§
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn try_acquire() -> Result<Self, &'static str>
pub fn try_acquire() -> Result<Self, &'static str>
Attempt to create a SpiceLock
instance.
Will be Err
if an instance already exists.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn illumf(
&self,
method: &str,
target: &str,
ilusrc: &str,
et: f64,
fixref: &str,
abcorr: &str,
obsrvr: &str,
spoint: [f64; 3],
) -> (f64, [f64; 3], f64, f64, f64, bool, bool)
pub fn illumf( &self, method: &str, target: &str, ilusrc: &str, et: f64, fixref: &str, abcorr: &str, obsrvr: &str, spoint: [f64; 3], ) -> (f64, [f64; 3], f64, f64, f64, bool, bool)
Compute the illumination angles—phase, incidence, and emission—at a specified point on a target body. Return logical flags indicating whether the surface point is visible from the observer’s position and whether the surface point is illuminated.
The target body’s surface is represented using topographic data provided by DSK files, or by a reference ellipsoid.
The illumination source is a specified ephemeris object.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn occult(
&self,
targ1: &str,
shape1: &str,
frame1: &str,
targ2: &str,
shape2: &str,
frame2: &str,
abcorr: &str,
obsrvr: &str,
et: f64,
) -> i32
pub fn occult( &self, targ1: &str, shape1: &str, frame1: &str, targ2: &str, shape2: &str, frame2: &str, abcorr: &str, obsrvr: &str, et: f64, ) -> i32
Determines the occultation condition (not occulted, partially, etc.) of one target relative to another target as seen by an observer at a given time, with targets modeled as points, ellipsoids, or digital shapes (DSK)
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn sincpt(
&self,
method: &str,
target: &str,
et: f64,
fixred: &str,
abcorr: &str,
obsrvr: &str,
dref: &str,
dvec: [f64; 3],
) -> ([f64; 3], f64, [f64; 3], bool)
pub fn sincpt( &self, method: &str, target: &str, et: f64, fixred: &str, abcorr: &str, obsrvr: &str, dref: &str, dvec: [f64; 3], ) -> ([f64; 3], f64, [f64; 3], bool)
Compute, for a given observer and a ray emanating from the observer, the surface intercept of the ray on a target body at a specified epoch, optionally corrected for light time and stellar aberration.
The surface of the target body may be represented by a triaxial ellipsoid or by topographic data provided by DSK files.
This routine supersedes srfxpt.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpiceLock
impl !RefUnwindSafe for SpiceLock
impl Send for SpiceLock
impl !Sync for SpiceLock
impl Unpin for SpiceLock
impl UnwindSafe for SpiceLock
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.