pub struct Connection<'a> { /* private fields */ }Expand description
AX.25 connection object.
Created from an AGW object, using .connect().
Implementations§
Source§impl<'a> Connection<'a>
impl<'a> Connection<'a>
Sourcepub fn connect_string(&self) -> &str
pub fn connect_string(&self) -> &str
Return the connect string.
Sourcepub fn make_writer(&self) -> MakeWriter
pub fn make_writer(&self) -> MakeWriter
Create MakeWriter object, in order to create AGW packets without holding on to a connection.
Sourcepub fn sender(&mut self) -> Sender<Vec<u8>>
pub fn sender(&mut self) -> Sender<Vec<u8>>
Return a copy of the mpsc to send bytes on the AGW connection.
TODO: this should probably be abstracted away.
Sourcepub fn disconnect(&mut self) -> Result<()>
pub fn disconnect(&mut self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Connection<'a>
impl<'a> RefUnwindSafe for Connection<'a>
impl<'a> Send for Connection<'a>
impl<'a> !Sync for Connection<'a>
impl<'a> Unpin for Connection<'a>
impl<'a> UnsafeUnpin for Connection<'a>
impl<'a> !UnwindSafe for Connection<'a>
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