pub enum ConnectionAddress {
Tcp(TcpConnectable),
Udp(UdpConnectable),
Serial(SerialConnectable),
File(FileConnectable),
}
Expand description
A parsed MAVLink connection address
Variants§
Tcp(TcpConnectable)
TCP client or server address
Udp(UdpConnectable)
UDP client, server or broadcast address
Serial(SerialConnectable)
Serial port address
File(FileConnectable)
File input address
Implementations§
Source§impl ConnectionAddress
impl ConnectionAddress
Sourcepub fn parse_address(address: &str) -> Result<ConnectionAddress, Error>
pub fn parse_address(address: &str) -> Result<ConnectionAddress, Error>
Parse a MAVLink address string.
The address must be in one of the following formats:
tcpin:<addr>:<port>
to create a TCP server, listening for an incoming connectiontcpout:<addr>:<port>
to create a TCP clientudpin:<addr>:<port>
to create a UDP server, listening for incoming packetsudpout:<addr>:<port>
to create a UDP clientudpbcast:<addr>:<port>
to create a UDP broadcastserial:<port>:<baudrate>
to create a serial connectionfile:<path>
to extract file data, writing to such a connection does nothing
Trait Implementations§
Source§impl AsyncConnectable for ConnectionAddress
impl AsyncConnectable for ConnectionAddress
Source§fn connect_async<'life0, 'async_trait, M>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncMavConnection<M> + Send + Sync>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
M: Message + Sync + Send + 'async_trait,
ConnectionAddress: 'async_trait,
fn connect_async<'life0, 'async_trait, M>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncMavConnection<M> + Send + Sync>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
M: Message + Sync + Send + 'async_trait,
ConnectionAddress: 'async_trait,
Attempt to establish an asynchronous MAVLink connection
Source§impl Connectable for ConnectionAddress
impl Connectable for ConnectionAddress
Auto Trait Implementations§
impl Freeze for ConnectionAddress
impl RefUnwindSafe for ConnectionAddress
impl Send for ConnectionAddress
impl Sync for ConnectionAddress
impl Unpin for ConnectionAddress
impl UnwindSafe for ConnectionAddress
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