pub struct AisParser { /* private fields */ }Expand description
Stateful AIS parser with multi-fragment reassembly.
Maintains fragment buffers for concurrent multi-part messages.
Feed it frames from parse_frame() — it returns decoded messages.
Implementations§
Source§impl AisParser
impl AisParser
pub fn new() -> Self
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Clear all in-progress fragment buffers.
Useful when switching data sources or recovering from a corrupted stream.
Sourcepub fn decode(&mut self, frame: &NmeaFrame<'_>) -> Option<AisMessage>
pub fn decode(&mut self, frame: &NmeaFrame<'_>) -> Option<AisMessage>
Decode an AIS frame. Returns Some(AisMessage) for complete messages,
None for incomplete fragments, parse errors, or non-AIS frames.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AisParser
impl RefUnwindSafe for AisParser
impl Send for AisParser
impl Sync for AisParser
impl Unpin for AisParser
impl UnsafeUnpin for AisParser
impl UnwindSafe for AisParser
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