#[repr(C)]#[repr(align(16))]pub struct SHVar {
pub payload: SHVarPayload,
pub valueType: SHType,
pub innerType: SHType,
pub flags: u16,
pub refcount: u32,
pub objectInfo: *mut SHObjectInfo,
}
Fields
payload: SHVarPayload
valueType: SHType
innerType: SHType
flags: u16
refcount: u32
objectInfo: *mut SHObjectInfo
Implementations
sourceimpl SHVar
impl SHVar
pub fn context_variable(name: &'static str) -> Var
pub fn new_object<T>(obj: &Rc<T>, info: &Type) -> Var
pub unsafe fn new_object_from_ptr<T>(obj: *const T, info: &Type) -> Var
pub unsafe fn new_object_from_raw_ptr(obj: SHPointer, info: &Type) -> Var
pub fn from_object_as_clone<T>(var: Var, info: &Type) -> Result<Rc<T>, &str>
pub fn get_mut_from_clone<'a, T>(
c: &Option<Rc<Option<T>>>
) -> Result<&'a mut T, &'a str>
pub fn from_object_mut_ref<T>(var: Var, info: &Type) -> Result<&mut T, &str>
pub fn from_object_ptr_mut_ref<T>(var: Var, info: &Type) -> Result<&mut T, &str>
pub fn from_object_ptr_ref<T>(var: Var, info: &Type) -> Result<&T, &str>
pub fn push<T: Into<Var>>(&mut self, _val: T)
pub fn try_push<T: TryInto<Var>>(&mut self, _val: T)
pub fn is_seq(&self) -> bool
pub fn is_none(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_path(&self) -> bool
pub fn as_ref(&self) -> &Self
pub fn is_context_var(&self) -> bool
pub fn enum_value(&self) -> Result<i32, &'static str>
Trait Implementations
sourceimpl From<&'_ SHVar> for ExternalVar
impl From<&'_ SHVar> for ExternalVar
impl Copy for SHVar
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more