pub enum ObsString {
Static(&'static str),
Dynamic(CString),
}
Variants§
Implementations§
Source§impl ObsString
impl ObsString
Sourcepub const unsafe fn from_nul_terminted_str(string: &'static str) -> Self
pub const unsafe fn from_nul_terminted_str(string: &'static str) -> Self
§Safety
Does no checks for nul terminated strings. This could cause memory overruns if used incorrectly.
pub fn as_str(&self) -> &str
pub fn as_ptr(&self) -> *const c_char
pub fn ptr_or_null(opt: &Option<Self>) -> *const c_char
Trait Implementations§
Source§impl FromDataItem for ObsString
impl FromDataItem for ObsString
fn typ() -> DataType
Source§unsafe fn from_item_unchecked(item: *mut obs_data_item_t) -> Self
unsafe fn from_item_unchecked(item: *mut obs_data_item_t) -> Self
Safety Read more
Source§unsafe fn set_default_unchecked(
obj: *mut obs_data_t,
name: ObsString,
val: Self,
)
unsafe fn set_default_unchecked( obj: *mut obs_data_t, name: ObsString, val: Self, )
Safety Read more
Source§impl ListType for ObsString
impl ListType for ObsString
fn format() -> ComboFormat
fn push_into(self, ptr: *mut obs_property_t, name: ObsString)
fn insert_into(self, ptr: *mut obs_property_t, name: ObsString, index: usize)
impl Eq for ObsString
impl StructuralPartialEq for ObsString
Auto Trait Implementations§
impl Freeze for ObsString
impl RefUnwindSafe for ObsString
impl Send for ObsString
impl Sync for ObsString
impl Unpin for ObsString
impl UnwindSafe for ObsString
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