pub struct Help { /* private fields */ }
Expand description
Load and parse the documentations at the SwitchBot API.
Please see Help::command_helps()
for an example.
Implementations§
Source§impl Help
impl Help
Sourcepub async fn load() -> Result<Self>
pub async fn load() -> Result<Self>
Loads and parses the documentations from the SwitchBot API.
Sourcepub fn command_helps(&self, device: &Device) -> &Vec<CommandHelp>
pub fn command_helps(&self, device: &Device) -> &Vec<CommandHelp>
Get a list of CommandHelp
for a Device
.
Returns an empty Vec
if no CommandHelp
s are found.
§Examples
let help = Help::load().await?;
let command_helps = help.command_helps(device);
for command_help in command_helps {
println!("{}", command_help);
}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Help
impl RefUnwindSafe for Help
impl Send for Help
impl Sync for Help
impl Unpin for Help
impl UnwindSafe for Help
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