pub struct Xb {
pub meta: Option<Metadata>,
pub constants: HashMap<String, Constant>,
pub ephemeris_root: Option<Ephemeris>,
pub orientation_root: Option<Orientation>,
pub navigation_objects: Vec<NavigationObject>,
pub instrument_root: Option<Instrument>,
}
Fields§
§meta: Option<Metadata>
§constants: HashMap<String, Constant>
§ephemeris_root: Option<Ephemeris>
§orientation_root: Option<Orientation>
§instrument_root: Option<Instrument>
Implementations§
source§impl Xb
impl Xb
sourcepub fn from_file(input_filename: &str) -> Result<Self, NyxError>
pub fn from_file(input_filename: &str) -> Result<Self, NyxError>
Loads the provided input_filename as an XB
sourcepub fn from_buffer(input_xb_buf: &[u8]) -> Result<Self, NyxError>
pub fn from_buffer(input_xb_buf: &[u8]) -> Result<Self, NyxError>
Loads the provided input buffer as an XB
sourcepub fn ephemeris_from_path<'a>(
&'a self,
path: &[usize]
) -> Result<&'a Ephemeris, NyxError>
pub fn ephemeris_from_path<'a>( &'a self, path: &[usize] ) -> Result<&'a Ephemeris, NyxError>
Finds the ephemeris provided the path as usize, e.g. [3,1] would return the Moon with any DE xb.
sourcepub fn ephemeris_find_path(&self, name: String) -> Result<Vec<usize>, NyxError>
pub fn ephemeris_find_path(&self, name: String) -> Result<Vec<usize>, NyxError>
Returns the machine path of the requested ephemeris
pub fn ephemeris_get_names(&self) -> Vec<String> ⓘ
Trait Implementations§
source§impl Message for Xb
impl Message for Xb
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global> ⓘwhere Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global> ⓘwhere Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.impl StructuralPartialEq for Xb
Auto Trait Implementations§
impl RefUnwindSafe for Xb
impl Send for Xb
impl Sync for Xb
impl Unpin for Xb
impl UnwindSafe for Xb
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for 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>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.