pub struct Tnc(/* private fields */);Expand description
A local or remote TNC attached to a radio, which can send and receive frames.
Implementations§
Source§impl Tnc
impl Tnc
Sourcepub fn open(address: &TncAddress) -> Result<Self, TncError>
pub fn open(address: &TncAddress) -> Result<Self, TncError>
Attempt to obtain a Tnc connection using the provided address.
Sourcepub fn send_frame(&self, frame: &Ax25Frame) -> Result<(), TncError>
pub fn send_frame(&self, frame: &Ax25Frame) -> Result<(), TncError>
Transmit a frame on the radio. Transmission is not guaranteed even if a
Ok result is returned.
Sourcepub fn incoming(&self) -> Receiver<Ax25FrameResult>
pub fn incoming(&self) -> Receiver<Ax25FrameResult>
Create a new Receiver<Result<Ax25Frame, TncError>>
This will receive a copy of all incoming frames.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tnc
impl RefUnwindSafe for Tnc
impl Send for Tnc
impl Sync for Tnc
impl Unpin for Tnc
impl UnsafeUnpin for Tnc
impl UnwindSafe for Tnc
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