pub trait ObsObjectUpdater<'a, K: Clone> {
type ToUpdate: ObsObjectTrait<K>;
// Required methods
fn create_update(
runtime: ObsRuntime,
updatable: &'a mut Self::ToUpdate,
) -> Result<Self, ObsError>
where Self: Sized;
fn get_settings(&self) -> &ObsData;
fn get_settings_updater(&mut self) -> &mut ObsDataUpdater;
fn update(self) -> Result<(), ObsError>;
fn runtime(&self) -> &ObsRuntime;
fn get_id() -> ObsString;
}Expand description
A trait that is used to represent any struct than can update an OBS object.
This can be for example a ´WindowSourceUpdater´, which updates the settings of the WindowSourceRef, when
the update method is called.
Required Associated Types§
type ToUpdate: ObsObjectTrait<K>
Required Methods§
fn create_update(
runtime: ObsRuntime,
updatable: &'a mut Self::ToUpdate,
) -> Result<Self, ObsError>where
Self: Sized,
fn get_settings(&self) -> &ObsData
fn get_settings_updater(&mut self) -> &mut ObsDataUpdater
fn update(self) -> Result<(), ObsError>
fn runtime(&self) -> &ObsRuntime
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.