pub enum Message {
Msm(MsmMessage),
StationCoordinates(StationCoordinates),
AntennaDescriptor(AntennaDescriptor),
GpsEphemeris(GpsEphemeris),
GlonassEphemeris(GlonassEphemeris),
Ssr(SsrMessage),
Unsupported(UnsupportedMessage),
}Expand description
The canonical, format-agnostic RTCM 3 message IR.
Each variant stores raw transmitted field integers (see the per-type docs),
and Message::encode is the exact inverse of Message::decode.
The variant set is the codec’s full supported coverage; any other message
number decodes to Message::Unsupported, so the enum is exhaustive and a
caller can both build any variant from scratch and match every case.
Variants§
Msm(MsmMessage)
An MSM4 or MSM7 multi-signal observation message.
StationCoordinates(StationCoordinates)
A 1005 / 1006 station antenna reference point.
AntennaDescriptor(AntennaDescriptor)
A 1007 / 1008 / 1033 antenna or receiver descriptor.
GpsEphemeris(GpsEphemeris)
A 1019 GPS broadcast ephemeris.
GlonassEphemeris(GlonassEphemeris)
A 1020 GLONASS broadcast ephemeris.
Ssr(SsrMessage)
A supported RTCM SSR correction message.
Unsupported(UnsupportedMessage)
A recognized-but-undecoded message, preserved verbatim.
Implementations§
Source§impl Message
impl Message
Sourcepub fn decode(body: &[u8]) -> Result<Self>
pub fn decode(body: &[u8]) -> Result<Self>
Decode a single RTCM 3 message body (the bytes between a frame’s length word and its CRC).
Never errors on an unknown message number: an unrecognized type decodes
to Message::Unsupported. Errors only on a truncated body of a
recognized type.
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Encode this message back into a body (without the transport frame).
Sourcepub fn message_number(&self) -> u16
pub fn message_number(&self) -> u16
The RTCM message number this IR encodes to.
Trait Implementations§
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.