pub struct Reference { /* private fields */ }
Implementations§
Source§impl Reference
impl Reference
pub fn null() -> Self
pub fn is_null(&self) -> bool
pub fn is_transferred(&self) -> bool
pub fn is_being_written(&mut self) -> bool
pub fn new_boolean(value: Boolean, registry: &Registry) -> Self
pub fn new_integer(value: Integer, registry: &Registry) -> Self
pub fn new_real(value: Real, registry: &Registry) -> Self
pub fn new_text(value: Text, registry: &Registry) -> Self
pub fn new_array(value: Array, registry: &Registry) -> Self
pub fn new_map(value: Map, registry: &Registry) -> Self
pub fn new_type(value: Type, registry: &Registry) -> Self
pub fn new_function(value: Function, registry: &Registry) -> Self
pub fn new<T: 'static>(data: T, registry: &Registry) -> Self
pub fn new_custom<T: 'static>(data: T, ty: &Type) -> Self
pub fn new_raw(data: Object) -> Self
pub fn initialized(ty: &Type) -> Self
Sourcepub unsafe fn uninitialized(ty: &Type) -> Self
pub unsafe fn uninitialized(ty: &Type) -> Self
§Safety
pub fn type_of(&self) -> Option<Type>
pub fn read<T: 'static>(&self) -> Option<Ref<'_, T>>
pub fn write<T: 'static>(&mut self) -> Option<RefMut<'_, T>>
pub fn read_object(&self) -> Option<Ref<'_, Object>>
pub fn write_object(&mut self) -> Option<RefMut<'_, Object>>
pub fn swap<T: 'static>(&mut self, data: T) -> Option<T>
pub fn try_consume(self) -> Result<Object, Self>
pub fn references_count(&self) -> usize
Trait Implementations§
Source§impl From<Reference> for Transferable
impl From<Reference> for Transferable
Source§impl From<Transferable> for Reference
impl From<Transferable> for Reference
Source§fn from(value: Transferable) -> Self
fn from(value: Transferable) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Reference
impl !RefUnwindSafe for Reference
impl !Send for Reference
impl !Sync for Reference
impl Unpin for Reference
impl !UnwindSafe for Reference
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