pub trait ObsDataGetters {
// Required methods
fn runtime(&self) -> &ObsRuntime;
fn as_ptr(&self) -> Sendable<*mut obs_data>;
// Provided methods
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> { ... }
}Required Methods§
Provided Methods§
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>
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.