pub struct PackagedDataBackend { /* private fields */ }Expand description
A packaged compressed-data backend.
Implementations§
Source§impl PackagedDataBackend
impl PackagedDataBackend
Sourcepub fn from_artifact(artifact: CompressedArtifact) -> Self
pub fn from_artifact(artifact: CompressedArtifact) -> Self
Creates a packaged-data backend from an explicit artifact.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, PackagedArtifactLoadError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, PackagedArtifactLoadError>
Creates a packaged-data backend from decoded artifact bytes.
See crate::packaged_backend_from_bytes for an end-to-end example that
encodes the checked-in artifact and reloads it through this constructor.
Sourcepub fn from_path(
path: impl AsRef<Path>,
) -> Result<Self, PackagedArtifactLoadError>
pub fn from_path( path: impl AsRef<Path>, ) -> Result<Self, PackagedArtifactLoadError>
Creates a packaged-data backend from an artifact file.
See crate::packaged_backend_from_path for an end-to-end example that writes
the checked-in artifact to a temporary file and reloads it through this
constructor.
Trait Implementations§
Source§impl Clone for PackagedDataBackend
impl Clone for PackagedDataBackend
Source§impl Debug for PackagedDataBackend
impl Debug for PackagedDataBackend
Source§impl Default for PackagedDataBackend
impl Default for PackagedDataBackend
Source§impl EphemerisBackend for PackagedDataBackend
impl EphemerisBackend for PackagedDataBackend
Source§fn metadata(&self) -> BackendMetadata
fn metadata(&self) -> BackendMetadata
Returns backend metadata.
Source§fn supports_body(&self, body: CelestialBody) -> bool
fn supports_body(&self, body: CelestialBody) -> bool
Returns whether the backend supports the requested body.
Source§fn position(
&self,
req: &EphemerisRequest,
) -> Result<EphemerisResult, EphemerisError>
fn position( &self, req: &EphemerisRequest, ) -> Result<EphemerisResult, EphemerisError>
Computes a single ephemeris result.
Source§fn positions(
&self,
reqs: &[EphemerisRequest],
) -> Result<Vec<EphemerisResult>, EphemerisError>
fn positions( &self, reqs: &[EphemerisRequest], ) -> Result<Vec<EphemerisResult>, EphemerisError>
Computes multiple ephemeris results. Read more
Auto Trait Implementations§
impl Freeze for PackagedDataBackend
impl RefUnwindSafe for PackagedDataBackend
impl Send for PackagedDataBackend
impl Sync for PackagedDataBackend
impl Unpin for PackagedDataBackend
impl UnsafeUnpin for PackagedDataBackend
impl UnwindSafe for PackagedDataBackend
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