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 from_raw_pointer( data: Sendable<*mut obs_data_t>, runtime: ObsRuntime, ) -> Self
pub fn to_mutable(&self) -> Result<ObsData, ObsError>
Trait Implementations§
Source§impl Clone for ImmutableObsData
impl Clone for ImmutableObsData
Source§fn clone(&self) -> ImmutableObsData
fn clone(&self) -> ImmutableObsData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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>
Source§impl ObsDataPointers for ImmutableObsData
impl ObsDataPointers for ImmutableObsData
fn runtime(&self) -> &ObsRuntime
fn as_ptr(&self) -> SmartPointerSendable<*mut obs_data_t>
Auto Trait Implementations§
impl Freeze for ImmutableObsData
impl !RefUnwindSafe for ImmutableObsData
impl Send for ImmutableObsData
impl Sync for ImmutableObsData
impl Unpin for ImmutableObsData
impl !UnwindSafe for ImmutableObsData
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