pub struct SpiceLock { /* private fields */ }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)
Trait Implementations§
Auto Trait Implementations§
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.