pub struct GoPro { /* private fields */ }
Expand description
Represents a connected GoPro device
Implementations§
Source§impl GoPro
impl GoPro
Sourcepub async fn send_command_unchecked(
&self,
command: &GoProCommand,
) -> Result<(), Box<dyn Error>>
pub async fn send_command_unchecked( &self, command: &GoProCommand, ) -> Result<(), Box<dyn Error>>
Sends a command to the GoPro without checking for a response
§Arguments
command
- The command to send to the GoPro
Sourcepub async fn send_command(
&self,
command: &GoProCommand,
) -> Result<(), Box<dyn Error>>
pub async fn send_command( &self, command: &GoProCommand, ) -> Result<(), Box<dyn Error>>
Sends a command to the GoPro and checks for a response, erroring if the response is incorrect
§Arguments
command
- The command to send to the GoPro
Sourcepub async fn send_setting_unchecked(
&self,
setting: &GoProSetting,
) -> Result<(), Box<dyn Error>>
pub async fn send_setting_unchecked( &self, setting: &GoProSetting, ) -> Result<(), Box<dyn Error>>
Sends a setting to the GoPro without checking for a response
§Arguments
setting
- The setting to send to the GoPro
Sourcepub async fn send_setting(
&self,
setting: &GoProSetting,
) -> Result<(), Box<dyn Error>>
pub async fn send_setting( &self, setting: &GoProSetting, ) -> Result<(), Box<dyn Error>>
Sends a setting to the GoPro and checks for a response, erroring if the response is incorrect
§Arguments
setting
- The setting to send to the GoPro
Sourcepub async fn query(
&self,
query: &GoProQuery,
) -> Result<QueryResponse, Box<dyn Error>>
pub async fn query( &self, query: &GoProQuery, ) -> Result<QueryResponse, Box<dyn Error>>
Sends a query to the GoPro and returns the response
§Arguments
query
- The query to send to the GoPro
Sourcepub async fn get_next_notification(
&self,
) -> Result<Option<ValueNotification>, Box<dyn Error>>
pub async fn get_next_notification( &self, ) -> Result<Option<ValueNotification>, Box<dyn Error>>
Gets the next notification (response from a command) from the GoPro
§Returns
Ok(Some(ValueNotification))
- If a notification was receivedOk(None)
- If no notification was receivedErr(Box<dyn Error>)
- If an error occurred
Auto Trait Implementations§
impl Freeze for GoPro
impl !RefUnwindSafe for GoPro
impl Send for GoPro
impl Sync for GoPro
impl Unpin for GoPro
impl !UnwindSafe for GoPro
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