Struct aprs_parser::AprsPacket
source · pub struct AprsPacket {
pub from: Callsign,
pub via: Vec<Via>,
pub data: AprsData,
}Fields§
§from: Callsign§via: Vec<Via>§data: AprsDataImplementations§
source§impl AprsPacket
impl AprsPacket
pub fn decode_textual(s: &[u8]) -> Result<Self, DecodeError>
pub fn to(&self) -> Option<&Callsign>
sourcepub fn encode_textual<W: Write>(&self, buf: &mut W) -> Result<(), EncodeError>
pub fn encode_textual<W: Write>(&self, buf: &mut W) -> Result<(), EncodeError>
Used for encoding a packet into ASCII for transmission on the internet (APRS-IS)
sourcepub fn decode_ax25(data: &[u8]) -> Result<Self, DecodeError>
pub fn decode_ax25(data: &[u8]) -> Result<Self, DecodeError>
Used for decoding a packet received over the air (via KISS or otherwise)
sourcepub fn encode_ax25<W: Write>(&self, buf: &mut W) -> Result<(), EncodeError>
pub fn encode_ax25<W: Write>(&self, buf: &mut W) -> Result<(), EncodeError>
Used for encoding a packet for transmission on the air (via KISS or otherwise)
Trait Implementations§
source§impl Clone for AprsPacket
impl Clone for AprsPacket
source§fn clone(&self) -> AprsPacket
fn clone(&self) -> AprsPacket
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 AprsPacket
impl Debug for AprsPacket
source§impl PartialEq for AprsPacket
impl PartialEq for AprsPacket
source§fn eq(&self, other: &AprsPacket) -> bool
fn eq(&self, other: &AprsPacket) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AprsPacket
Auto Trait Implementations§
impl RefUnwindSafe for AprsPacket
impl Send for AprsPacket
impl Sync for AprsPacket
impl Unpin for AprsPacket
impl UnwindSafe for AprsPacket
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