Skip to main content

AsyncDialectConnection

Struct AsyncDialectConnection 

Source
pub struct AsyncDialectConnection<D> { /* private fields */ }
Available on crate feature tokio only.
Expand description

A concrete async connection using a dialect.

Trait Implementations§

Source§

impl<D> AsyncMavConnection<<D as Dialect>::Message> for AsyncDialectConnection<D>
where D: Dialect + Send + Sync, <D as Dialect>::Message: Send + Sync,

Source§

async fn recv( &self, ) -> Result<(MavHeader, <D as Dialect>::Message), MessageReadError>

Receive a mavlink message. Read more
Source§

async fn recv_raw(&self) -> Result<MAVLinkMessageRaw, MessageReadError>

Receive a raw, unparsed mavlink message. Read more
Source§

async fn try_recv( &self, ) -> Result<(MavHeader, <D as Dialect>::Message), MessageReadError>

Receive a MAVLink message without retrying read or parse errors. Read more
Source§

async fn send( &self, header: &MavHeader, data: &<D as Dialect>::Message, ) -> Result<usize, MessageWriteError>

Send a mavlink message
Source§

async fn send_raw( &self, data: &MAVLinkMessageRaw, ) -> Result<usize, MessageWriteError>

Send a raw, unparsed mavlink message
Source§

fn set_protocol_version(&mut self, version: MavlinkVersion)

Sets the MAVLink version to use for receiving (when allow_recv_any_version() is false) and sending messages.
Source§

fn protocol_version(&self) -> MavlinkVersion

Gets the currently used MAVLink version
Source§

fn set_allow_recv_any_version(&mut self, allow: bool)

Set wether MAVLink messages of either version may be received. Read more
Source§

fn allow_recv_any_version(&self) -> bool

Wether messages of any MAVLink version may be received.
Source§

fn setup_signing(&mut self, signing_data: Option<SigningConfig>)

Available on crate feature mav2-message-signing only.
Setup secret key used for message signing, or disable message signing.
Source§

fn send_frame( &self, frame: &MavFrame<M>, ) -> impl Future<Output = Result<usize, MessageWriteError>> + Send
where M: Message,

Write whole frame.
Source§

fn recv_frame( &self, ) -> impl Future<Output = Result<MavFrame<M>, MessageReadError>> + Send
where M: Message,

Read whole frame.
Source§

fn send_default( &self, data: &M, ) -> impl Future<Output = Result<usize, MessageWriteError>> + Send

Send a message with default header.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.