pub struct ValueRef<'a> { /* private fields */ }Implementations§
Source§impl<'a> ValueRef<'a>
impl<'a> ValueRef<'a>
Sourcepub unsafe fn from_ptr(value: *const ScsValue) -> Option<Self>
pub unsafe fn from_ptr(value: *const ScsValue) -> Option<Self>
Borrows a tagged SDK value for the duration of its callback.
§Safety
value must either be null or point to a correctly aligned, initialized
sys::ScsValue that remains alive for 'a. For a known type tag, the
corresponding union member must be initialized. Unknown tags are
preserved without reading the union. String members must be non-null,
NUL-terminated, and remain alive for the same lifetime.
pub const fn raw_type(self) -> ScsValueType
pub const fn value_type(self) -> Option<ValueType>
pub fn as_bool(self) -> Option<bool>
pub fn as_i32(self) -> Option<i32>
pub fn as_u32(self) -> Option<u32>
pub fn as_u64(self) -> Option<u64>
pub fn as_i64(self) -> Option<i64>
pub fn as_f32(self) -> Option<f32>
pub fn as_f64(self) -> Option<f64>
pub fn as_fvector(self) -> Option<FVector>
pub fn as_dvector(self) -> Option<DVector>
pub fn as_euler(self) -> Option<Euler>
pub fn as_fplacement(self) -> Option<FPlacement>
pub fn as_dplacement(self) -> Option<DPlacement>
pub fn as_c_str(self) -> Option<&'a CStr>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Send for ValueRef<'a>
impl<'a> !Sync for ValueRef<'a>
impl<'a> Freeze for ValueRef<'a>
impl<'a> RefUnwindSafe for ValueRef<'a>
impl<'a> Unpin for ValueRef<'a>
impl<'a> UnsafeUnpin for ValueRef<'a>
impl<'a> UnwindSafe for ValueRef<'a>
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