obws 0.15.0

The obws (obvious) remote control library for OBS.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::Client;
use crate::{error::Result, requests::canvases::Request, responses::canvases as responses};

/// API functions related to canvases.
pub struct Canvases<'a> {
    pub(super) client: &'a Client,
}

impl Canvases<'_> {
    /// Gets an array of all canvases in OBS.
    #[doc(alias = "GetCanvasList")]
    pub async fn list(&self) -> Result<Vec<responses::Canvas>> {
        self.client
            .send_message::<_, responses::Canvases>(Request::List)
            .await
            .map(|c| c.canvases)
    }
}