pub struct ObsRuntime { /* private fields */ }Expand description
Core runtime that serializes access to libobs.
Implementations§
Source§impl ObsRuntime
impl ObsRuntime
Sourcepub fn is_actor_thread(&self) -> bool
pub fn is_actor_thread(&self) -> bool
Returns true when called from the dedicated OBS actor thread.
Sourcepub fn same_instance(&self, other: &Self) -> bool
pub fn same_instance(&self, other: &Self) -> bool
Returns true when both values belong to the same process-global OBS runtime.
Sourcepub fn run_with_obs_no_block<F>(&self, operation: F) -> Result<(), ObsError>
pub fn run_with_obs_no_block<F>(&self, operation: F) -> Result<(), ObsError>
Dispatches work without waiting for completion.
The regular actor queue is bounded. If it is full this returns
ObsError::RuntimeQueueFull instead of growing memory without bound.
Sourcepub fn run_with_obs_result<F, T>(&self, operation: F) -> Result<T, ObsError>
pub fn run_with_obs_result<F, T>(&self, operation: F) -> Result<T, ObsError>
Runs work on the OBS actor and returns its typed result.
Unlike the old implementation this does not erase the result into Any, so
there is no runtime downcast or corresponding impossible error path.
Trait Implementations§
Source§impl Clone for ObsRuntime
impl Clone for ObsRuntime
Source§fn clone(&self) -> ObsRuntime
fn clone(&self) -> ObsRuntime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ObsRuntime
impl RefUnwindSafe for ObsRuntime
impl Send for ObsRuntime
impl Sync for ObsRuntime
impl Unpin for ObsRuntime
impl UnsafeUnpin for ObsRuntime
impl UnwindSafe for ObsRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more