Skip to main content

ObsSourceBuilder

Trait ObsSourceBuilder 

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§

fn build(self) -> Result<Self::T, ObsError>
where Self: Sized,

Provided Methods§

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.

Implementors§

Source§

impl ObsSourceBuilder for PipeWireCameraSourceBuilder

Available on Linux only.
Source§

type T = ObsSourceRef

Source§

impl ObsSourceBuilder for PipeWireDesktopCaptureSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for PipeWireScreenCaptureSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for PipeWireWindowCaptureSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for AlsaInputSourceBuilder

Available on Linux only.
Source§

type T = ObsSourceRef

Source§

impl ObsSourceBuilder for JackOutputSourceBuilder

Available on Linux only.
Source§

type T = ObsSourceRef

Source§

impl ObsSourceBuilder for LinuxGeneralScreenCaptureBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for LinuxGeneralWindowCaptureBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for PulseInputSourceBuilder

Available on Linux only.
Source§

type T = ObsSourceRef

Source§

impl ObsSourceBuilder for PulseOutputSourceBuilder

Available on Linux only.
Source§

type T = ObsSourceRef

Source§

impl ObsSourceBuilder for V4L2InputSourceBuilder

Available on Linux only.
Source§

type T = ObsSourceRef

Source§

impl ObsSourceBuilder for X11CaptureSourceBuilder

Available on Linux only.
Source§

type T = ObsSourceRef

Source§

impl ObsSourceBuilder for XCompositeInputSourceBuilder

Available on Linux only.
Source§

impl ObsSourceBuilder for GameCaptureSourceBuilder

Available on Windows only.
Source§

impl ObsSourceBuilder for MonitorCaptureSourceBuilder

Available on Windows only.
Source§

impl ObsSourceBuilder for WindowCaptureSourceBuilder

Available on Windows only.