1use crate::prelude::Rinex;
2
3#[cfg(feature = "sp3")]
4use crate::prelude::SP3;
5
6#[derive(Clone)]
7pub enum BlobData {
8 RINEX(Rinex),
10 #[cfg(feature = "sp3")]
11 SP3(SP3),
13}
14
15impl BlobData {
16 pub fn as_rinex(&self) -> Option<&Rinex> {
18 match self {
19 Self::RINEX(r) => Some(r),
20 #[cfg(feature = "sp3")]
21 _ => None,
22 }
23 }
24
25 pub fn as_mut_rinex(&mut self) -> Option<&mut Rinex> {
27 match self {
28 Self::RINEX(r) => Some(r),
29 #[cfg(feature = "sp3")]
30 _ => None,
31 }
32 }
33}
34
35#[cfg(feature = "sp3")]
37#[cfg_attr(docsrs, doc(cfg(feature = "sp3")))]
38impl BlobData {
39 pub fn as_sp3(&self) -> Option<&SP3> {
41 match self {
42 Self::SP3(s) => Some(s),
43 _ => None,
44 }
45 }
46
47 pub fn as_mut_sp3(&mut self) -> Option<&mut SP3> {
49 match self {
50 Self::SP3(s) => Some(s),
51 _ => None,
52 }
53 }
54}