pub struct SlowDataTextCollector { /* private fields */ }Expand description
D-STAR slow-data text-message collector.
See the module docs for wire-format details. Feed each voice-frame
slow-data payload via Self::push. When all four indexed blocks
have been seen, Self::take_message returns the 20-character
message; the collector then rearms for the next message.
Implementations§
Source§impl SlowDataTextCollector
impl SlowDataTextCollector
Sourcepub fn push(&mut self, fragment: [u8; 3], frame_index: u8)
pub fn push(&mut self, fragment: [u8; 3], frame_index: u8)
Feed one voice frame’s slow-data payload.
frame_index == 0 marks a D-STAR superframe sync frame: the
partial half-block state is discarded and the next push is
treated as the first half of a fresh block.
Sourcepub fn message(&self) -> Option<[u8; 20]>
pub fn message(&self) -> Option<[u8; 20]>
Return the complete 20-char message if all four blocks have been seen.
Sourcepub fn take_message(&mut self) -> Option<[u8; 20]>
pub fn take_message(&mut self) -> Option<[u8; 20]>
Consume the complete message and rearm the collector.
Trait Implementations§
Source§impl Clone for SlowDataTextCollector
impl Clone for SlowDataTextCollector
Source§fn clone(&self) -> SlowDataTextCollector
fn clone(&self) -> SlowDataTextCollector
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SlowDataTextCollector
impl Debug for SlowDataTextCollector
Auto Trait Implementations§
impl Freeze for SlowDataTextCollector
impl RefUnwindSafe for SlowDataTextCollector
impl Send for SlowDataTextCollector
impl Sync for SlowDataTextCollector
impl Unpin for SlowDataTextCollector
impl UnwindSafe for SlowDataTextCollector
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