[][src]Struct ax25::frame::Ax25Frame

pub struct Ax25Frame {
    pub source: Address,
    pub destination: Address,
    pub route: Vec<RouteEntry>,
    pub command_or_response: Option<CommandResponse>,
    pub content: FrameContent,
}

A strongly-typed representation of a single AX.25 frame.

Fields

source: Address

Sending station

destination: Address

Destination station

route: Vec<RouteEntry>

The route the frame has taken/will take according to repeater entries in the address field

command_or_response: Option<CommandResponse>

AX.25 2.0-compliant stations will indicate in every frame whether it is a command or a response, as part of the address field.

content: FrameContent

Various content depending on the packet type

Methods

impl Ax25Frame[src]

pub fn info_string_lossy(&self) -> Option<String>[src]

Returns a UTF-8 string that is a "best effort" at displaying the information content of this frame. Returns None if there is no information field present. Most applications will need to work with the Vec info directly.

pub fn from_bytes(bytes: &[u8]) -> Result<Ax25Frame, FrameParseError>[src]

Parse raw bytes into an Ax25Frame if possible.

pub fn to_bytes(&self) -> Vec<u8>[src]

Encode an Ax25Frame struct as raw bytes for transmission

Trait Implementations

impl Debug for Ax25Frame[src]

impl Display for Ax25Frame[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.