pub struct ImmutableObsData { /* private fields */ }Expand description
Immutable wrapper around obs_data_t to be prevent modification and to be used in creation of other objects.
DO NOT update this data using the pointer directly. If you want to change the data,
use the corresponding update methods of the struct you want to update or turn this struct into
a ObsData object by using the to_mutable method.
Implementations§
Source§impl ImmutableObsData
impl ImmutableObsData
pub fn new(runtime: &ObsRuntime) -> Result<Self, ObsError>
pub fn to_mutable(&self) -> Result<ObsData, ObsError>
Trait Implementations§
Source§impl Clone for ImmutableObsData
impl Clone for ImmutableObsData
Source§impl Debug for ImmutableObsData
impl Debug for ImmutableObsData
Source§impl From<ObsData> for ImmutableObsData
impl From<ObsData> for ImmutableObsData
Source§impl ObsDataGetters for ImmutableObsData
impl ObsDataGetters for ImmutableObsData
fn get_string<T: Into<ObsString> + Send + Sync>( &self, key: T, ) -> Result<Option<String>, ObsError>
fn get_int<T: Into<ObsString> + Sync + Send>( &self, key: T, ) -> Result<Option<i64>, ObsError>
fn get_bool<T: Into<ObsString> + Sync + Send>( &self, key: T, ) -> Result<Option<bool>, ObsError>
fn get_double<T: Into<ObsString> + Sync + Send>( &self, key: T, ) -> Result<Option<f64>, ObsError>
fn get_json(&self) -> Result<String, ObsError>
Auto Trait Implementations§
impl !RefUnwindSafe for ImmutableObsData
impl !UnwindSafe for ImmutableObsData
impl Forget for ImmutableObsData
impl Freeze for ImmutableObsDatawhere
*const ArcInner<Sender<ObsCommand>> is !null: Freeze,
PhantomData<ArcInner<Sender<ObsCommand>>>: Freeze,
*const ArcInner<Sender<Box<dyn FnOnce() + Send>>> is !null: Freeze,
PhantomData<ArcInner<Sender<Box<dyn FnOnce() + Send>>>>: Freeze,
*const ArcInner<Atomic<u8>> is !null: Freeze,
PhantomData<ArcInner<Atomic<u8>>>: Freeze,
*const ArcInner<NativeObjectRegistry> is !null: Freeze,
PhantomData<ArcInner<NativeObjectRegistry>>: Freeze,
NonZero<u64>: Freeze,
*const ArcInner<_ObsRuntimeGuard> is !null: Freeze,
PhantomData<ArcInner<_ObsRuntimeGuard>>: Freeze,
*const ArcInner<NativeHandleLease> is !null: Freeze,
PhantomData<ArcInner<NativeHandleLease>>: Freeze,
PhantomData<fn() -> *mut obs_data>: Freeze,
impl Move for ImmutableObsData
impl Send for ImmutableObsData
impl Sync for ImmutableObsData
impl Unpin for ImmutableObsData
impl UnsafeUnpin for ImmutableObsDatawhere
*const ArcInner<Sender<ObsCommand>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Sender<ObsCommand>>>: UnsafeUnpin,
*const ArcInner<Sender<Box<dyn FnOnce() + Send>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Sender<Box<dyn FnOnce() + Send>>>>: UnsafeUnpin,
*const ArcInner<Atomic<u8>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u8>>>: UnsafeUnpin,
*const ArcInner<NativeObjectRegistry> is !null: UnsafeUnpin,
PhantomData<ArcInner<NativeObjectRegistry>>: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
*const ArcInner<_ObsRuntimeGuard> is !null: UnsafeUnpin,
PhantomData<ArcInner<_ObsRuntimeGuard>>: UnsafeUnpin,
*const ArcInner<NativeHandleLease> is !null: UnsafeUnpin,
PhantomData<ArcInner<NativeHandleLease>>: UnsafeUnpin,
PhantomData<fn() -> *mut obs_data>: UnsafeUnpin,
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