pub struct Object { /* private fields */ }Expand description
An owned reference to a managed object.
Implementations§
Source§impl Object
impl Object
Sourcepub unsafe fn from_handle(
handle: isize,
runtime: Runtime,
assembly: &'static BoundAssembly,
) -> Self
pub unsafe fn from_handle( handle: isize, runtime: Runtime, assembly: &'static BoundAssembly, ) -> Self
Takes ownership of a GCHandle returned by a thunk.
§Safety
handle must be a live GCHandle that nothing else will free.
Sourcepub fn handle(&self) -> isize
pub fn handle(&self) -> isize
The GCHandle to pass to thunks for this object; still owned by self.
Sourcepub fn assembly(&self) -> &'static BoundAssembly
pub fn assembly(&self) -> &'static BoundAssembly
The bound assembly whose thunks handle this object.
Sourcepub fn to_managed_string(&self) -> Result<String>
pub fn to_managed_string(&self) -> Result<String>
The object’s ToString().
Trait Implementations§
Auto Trait Implementations§
impl Forget for Object
impl Freeze for Objectwhere
*const ArcInner<Inner> is !null: Freeze,
PhantomData<ArcInner<Inner>>: Freeze,
&'static BoundAssembly: Freeze,
impl Move for Object
impl RefUnwindSafe for Objectwhere
Atomic<usize>: RefUnwindSafe,
OnceLock<Loader>: RefUnwindSafe,
Mutex<()>: RefUnwindSafe,
OnceLock<usize>: RefUnwindSafe,
Mutex<HashMap<String, usize>>: RefUnwindSafe,
OnceLock<EnumMethods>: RefUnwindSafe,
OnceLock<Vec<usize>>: RefUnwindSafe,
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Objectwhere
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
&'static BoundAssembly: UnsafeUnpin,
impl UnwindSafe for Object
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