sl4f_lib/virtual_camera/
types.rs1pub enum VirtualCameraMethod {
7 AddStreamConfig,
8 AddToDeviceWatcher,
9}
10
11impl std::str::FromStr for VirtualCameraMethod {
12 type Err = anyhow::Error;
13
14 fn from_str(method: &str) -> Result<Self, Self::Err> {
15 match method {
16 "AddStreamConfig" => Ok(VirtualCameraMethod::AddStreamConfig),
17 "AddToDeviceWatcher" => Ok(VirtualCameraMethod::AddToDeviceWatcher),
18 _ => {
19 return Err(format_err!("invalid Virtual Camera Device Facade method: {}", method))
20 } }
23 }
24}