Type Alias BPC
pub type BPC = GenericDAF<BPCSummaryRecord, Bytes>;
Expand description
Binary Planetary Constant
Aliased Type§
struct BPC {
pub bytes: Bytes,
pub crc32_checksum: u32,
pub _daf_type: PhantomData<BPCSummaryRecord>,
}
Fields§
§bytes: Bytes
§crc32_checksum: u32
§_daf_type: PhantomData<BPCSummaryRecord>
Implementations
§impl<R> GenericDAF<R, Bytes>where
R: NAIFSummaryRecord,
impl<R> GenericDAF<R, Bytes>where
R: NAIFSummaryRecord,
pub fn parse<B>(bytes: B) -> Result<GenericDAF<R, Bytes>, DAFError>
pub fn parse<B>(bytes: B) -> Result<GenericDAF<R, Bytes>, DAFError>
Parse the provided bytes as a SPICE Double Array File
pub fn check_then_parse<B>(
bytes: B,
expected: u32,
) -> Result<GenericDAF<R, Bytes>, DAFError>
pub fn check_then_parse<B>( bytes: B, expected: u32, ) -> Result<GenericDAF<R, Bytes>, DAFError>
Parse the DAF only if the CRC32 checksum of the data is valid
pub fn load(path: &str) -> Result<GenericDAF<R, Bytes>, DAFError>
pub fn from_static<B>(
bytes: &'static B,
) -> Result<GenericDAF<R, Bytes>, DAFError>
pub fn from_static<B>( bytes: &'static B, ) -> Result<GenericDAF<R, Bytes>, DAFError>
Parse the provided static byte array as a SPICE Double Array File
pub fn to_mutable(&self) -> GenericDAF<R, BytesMut>
pub fn to_mutable(&self) -> GenericDAF<R, BytesMut>
Copies the underlying bytes of this DAF into a MutDAF, enabling modification of the DAF.
§impl<R, W> GenericDAF<R, W>where
R: NAIFSummaryRecord,
W: MutKind,
impl<R, W> GenericDAF<R, W>where
R: NAIFSummaryRecord,
W: MutKind,
pub fn scrub(&self) -> Result<(), IntegrityError>
pub fn scrub(&self) -> Result<(), IntegrityError>
Scrubs the data by computing the CRC32 of the bytes and making sure that it still matches the previously known hash
pub fn file_record(&self) -> Result<FileRecord, DAFError>
pub fn name_record(&self) -> Result<NameRecord, DAFError>
pub fn daf_summary(&self) -> Result<SummaryRecord, DAFError>
pub fn data_summaries(&self) -> Result<&[R], DAFError>
pub fn data_summaries(&self) -> Result<&[R], DAFError>
Parses the data summaries on the fly.
pub fn summary_from_name(&self, name: &str) -> Result<(&R, usize), DAFError>
pub fn summary_from_name(&self, name: &str) -> Result<(&R, usize), DAFError>
Returns the summary given the name of the summary record
pub fn summary_from_name_at_epoch(
&self,
name: &str,
epoch: Epoch,
) -> Result<(&R, usize), DAFError>
pub fn summary_from_name_at_epoch( &self, name: &str, epoch: Epoch, ) -> Result<(&R, usize), DAFError>
Returns the summary given the name of the summary record if that summary has data defined at the requested epoch
pub fn summary_from_id(&self, id: i32) -> Result<(&R, usize), DAFError>
pub fn summary_from_id(&self, id: i32) -> Result<(&R, usize), DAFError>
Returns the summary given the id of the summary record
pub fn summary_from_id_at_epoch(
&self,
id: i32,
epoch: Epoch,
) -> Result<(&R, usize), DAFError>
pub fn summary_from_id_at_epoch( &self, id: i32, epoch: Epoch, ) -> Result<(&R, usize), DAFError>
Returns the summary given the name of the summary record if that summary has data defined at the requested epoch
pub fn data_from_name<'a, S>(&'a self, name: &str) -> Result<S, DAFError>where
S: NAIFDataSet<'a>,
pub fn data_from_name<'a, S>(&'a self, name: &str) -> Result<S, DAFError>where
S: NAIFDataSet<'a>,
Provided a name that is in the summary, return its full data, if name is available.
pub fn nth_data<'a, S>(&'a self, idx: usize) -> Result<S, DAFError>where
S: NAIFDataSet<'a>,
pub fn nth_data<'a, S>(&'a self, idx: usize) -> Result<S, DAFError>where
S: NAIFDataSet<'a>,
Provided a name that is in the summary, return its full data, if name is available.
pub fn comments(&self) -> Result<Option<String>, DAFError>
Trait Implementations
§impl<R, W> Hash for GenericDAF<R, W>where
R: NAIFSummaryRecord,
W: MutKind,
impl<R, W> Hash for GenericDAF<R, W>where
R: NAIFSummaryRecord,
W: MutKind,
§impl NAIFPrettyPrint for GenericDAF<BPCSummaryRecord, Bytes>
impl NAIFPrettyPrint for GenericDAF<BPCSummaryRecord, Bytes>
§fn describe_in(&self, time_scale: TimeScale, round: Option<bool>) -> String
fn describe_in(&self, time_scale: TimeScale, round: Option<bool>) -> String
Returns a string of a table representing this BPC where the epochs are printed in the provided time scale
Set round
to Some(false) to not round the durations. By default, the durations will be rounded to the nearest second.