pub trait ObsSourceBuilder: ObsObjectBuilder {
type T: ObsSourceTrait + Clone + 'static;
// Required method
fn build(self) -> Result<Self::T, ObsError>
where Self: Sized;
// Provided method
fn add_to_scene(
self,
scene: &mut ObsSceneRef,
) -> Result<ObsSceneItemRef<Self::T>, ObsError>
where Self: Sized { ... }
}Required Associated Types§
type T: ObsSourceTrait + Clone + 'static
Required Methods§
Provided Methods§
Sourcefn add_to_scene(
self,
scene: &mut ObsSceneRef,
) -> Result<ObsSceneItemRef<Self::T>, ObsError>where
Self: Sized,
fn add_to_scene(
self,
scene: &mut ObsSceneRef,
) -> Result<ObsSceneItemRef<Self::T>, ObsError>where
Self: Sized,
Both items are returned: the source and the scene item it was added as. You can safely drop these items, they are stored within the scene if you don’t need them.
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.