Skip to main content

ObsObjectUpdater

Trait ObsObjectUpdater 

Source
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§

Required Methods§

Source

fn create_update( runtime: ObsRuntime, updatable: &'a mut Self::ToUpdate, ) -> Result<Self, ObsError>
where Self: Sized,

Source

fn get_settings(&self) -> &ObsData

Source

fn get_settings_updater(&mut self) -> &mut ObsDataUpdater

Source

fn update(self) -> Result<(), ObsError>

Source

fn runtime(&self) -> &ObsRuntime

Source

fn get_id() -> ObsString

Returns the ID of the object

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§