mirror of https://github.com/dnaka91/obws
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
780 B
Rust
29 lines
780 B
Rust
//! Requests related to scene collections.
|
|
|
|
use serde::Serialize;
|
|
|
|
#[derive(Serialize)]
|
|
#[serde(tag = "requestType", content = "requestData")]
|
|
pub(crate) enum Request<'a> {
|
|
#[serde(rename = "GetSceneCollectionList")]
|
|
List,
|
|
#[serde(rename = "SetCurrentSceneCollection")]
|
|
SetCurrent {
|
|
/// Name of the scene collection to switch to.
|
|
#[serde(rename = "sceneCollectionName")]
|
|
name: &'a str,
|
|
},
|
|
#[serde(rename = "CreateSceneCollection")]
|
|
Create {
|
|
/// Name for the new scene collection.
|
|
#[serde(rename = "sceneCollectionName")]
|
|
name: &'a str,
|
|
},
|
|
}
|
|
|
|
impl<'a> From<Request<'a>> for super::RequestType<'a> {
|
|
fn from(value: Request<'a>) -> Self {
|
|
super::RequestType::SceneCollections(value)
|
|
}
|
|
}
|