Struct aprs_parser::AprsStatus
source · pub struct AprsStatus {
pub to: Callsign,
/* private fields */
}Fields§
§to: CallsignImplementations§
source§impl AprsStatus
impl AprsStatus
pub fn new( to: Callsign, timestamp: Option<DhmTimestamp>, comment: Vec<u8> ) -> Self
sourcepub fn new_noncompliant(
to: Callsign,
timestamp: Option<Timestamp>,
comment: Vec<u8>
) -> Self
pub fn new_noncompliant( to: Callsign, timestamp: Option<Timestamp>, comment: Vec<u8> ) -> Self
According to APRS spec, an AprsStatus should only allow the DDHHMM timestamp. (See page 80 of APRS101.PDF) In practice, many encoders don’t adhere to this. Use this function to create an AprsStatus with any timestamp type
pub fn is_timestamp_compliant(&self) -> bool
pub fn timestamp(&self) -> Option<&Timestamp>
pub fn comment(&self) -> &[u8] ⓘ
pub fn decode(b: &[u8], to: Callsign) -> Result<Self, DecodeError>
pub fn encode<W: Write>(&self, buf: &mut W) -> Result<(), EncodeError>
Trait Implementations§
source§impl Clone for AprsStatus
impl Clone for AprsStatus
source§fn clone(&self) -> AprsStatus
fn clone(&self) -> AprsStatus
Returns a copy 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 AprsStatus
impl Debug for AprsStatus
source§impl PartialEq for AprsStatus
impl PartialEq for AprsStatus
source§fn eq(&self, other: &AprsStatus) -> bool
fn eq(&self, other: &AprsStatus) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for AprsStatus
impl StructuralEq for AprsStatus
impl StructuralPartialEq for AprsStatus
Auto Trait Implementations§
impl RefUnwindSafe for AprsStatus
impl Send for AprsStatus
impl Sync for AprsStatus
impl Unpin for AprsStatus
impl UnwindSafe for AprsStatus
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