pub struct LinkContext { /* private fields */ }Expand description
Context for the link connections
Implementations§
Source§impl LinkContext
impl LinkContext
Sourcepub async fn scan(&self, address: [u8; 5]) -> Result<Vec<String>, Error>
pub async fn scan(&self, address: [u8; 5]) -> Result<Vec<String>, Error>
Scan for Crazyflies at some given address
This function will send a packet to every channels and look for an acknowledgement in return.
The address argument will set the radio packets address to scan for.
It returns a list of URIs that can be passed to the LinkContext::open_link() function.
Sourcepub async fn scan_selected(&self, uris: Vec<&str>) -> Result<Vec<String>, Error>
pub async fn scan_selected(&self, uris: Vec<&str>) -> Result<Vec<String>, Error>
Scan for a given list of URIs
Send a packet to each URI and detect if an acknowledgement is sent back.
Returns the list of URIs that acknowledged
Sourcepub async fn open_link(&self, uri: &str) -> Result<Connection, Error>
pub async fn open_link(&self, uri: &str) -> Result<Connection, Error>
Open a link connection to a given URI
If successful, the link Connection is returned.
Auto Trait Implementations§
impl !Freeze for LinkContext
impl !RefUnwindSafe for LinkContext
impl Send for LinkContext
impl Sync for LinkContext
impl Unpin for LinkContext
impl UnwindSafe for LinkContext
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