pub struct DroneTcpConnection { /* private fields */ }Implementations§
Source§impl DroneTcpConnection
impl DroneTcpConnection
Sourcepub fn new(
bind_ip: String,
bind_port: String,
connect_ip: String,
connect_port: String,
) -> Self
pub fn new( bind_ip: String, bind_port: String, connect_ip: String, connect_port: String, ) -> Self
Create a new drone connection takes in bind_ip, bind_port, connect_ip, and connect_port all as Strings
Sourcepub fn send_command(&mut self, hex_str: String) -> Result<(), Box<dyn Error>>
pub fn send_command(&mut self, hex_str: String) -> Result<(), Box<dyn Error>>
Send a static command to the drone
pub fn read(&mut self) -> Result<Vec<u8>, Box<dyn Error>>
Auto Trait Implementations§
impl Freeze for DroneTcpConnection
impl RefUnwindSafe for DroneTcpConnection
impl Send for DroneTcpConnection
impl Sync for DroneTcpConnection
impl Unpin for DroneTcpConnection
impl UnwindSafe for DroneTcpConnection
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