Skip to main content

AsyncConnectable

Trait AsyncConnectable 

Source
pub trait AsyncConnectable: Sync {
    // Required method
    fn connect_async_with_dialect<D: Dialect + Send + Sync>(
        &self,
        dialect: D,
    ) -> impl Future<Output = Result<AsyncDialectConnection<D>>> + Send
       where D::Message: Send + Sync;

    // Provided method
    fn connect_async<M: Message + Sync + Send>(
        &self,
    ) -> impl Future<Output = Result<AsyncConnection<M>>> + Send { ... }
}
Available on crate feature tokio and (crate features std or tokio) only.
Expand description

A MAVLink connection address that can be connected to, establishing an AsyncMavConnection

This is the async version of Connectable.

Required Methods§

Source

fn connect_async_with_dialect<D: Dialect + Send + Sync>( &self, dialect: D, ) -> impl Future<Output = Result<AsyncDialectConnection<D>>> + Send
where D::Message: Send + Sync,

Attempt to establish an asynchronous MAVLink connection with a runtime-loaded dialect.

Provided Methods§

Source

fn connect_async<M: Message + Sync + Send>( &self, ) -> impl Future<Output = Result<AsyncConnection<M>>> + Send

Attempt to establish an asynchronous MAVLink connection

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl AsyncConnectable for ConnectionAddress

Source§

impl AsyncConnectable for FileConfig

Source§

impl AsyncConnectable for SerialConfig

Available on crate feature transport-direct-serial only.
Source§

impl AsyncConnectable for TcpConfig

Available on crate feature transport-tcp only.
Source§

impl AsyncConnectable for UdpConfig

Available on crate feature transport-udp only.