#[repr(C)]
pub struct Handle<T> {
pub ptr: *const T,
pub _phantom_0: PhantomData<UnsafeCell<T>>,
}
Expand description
Reference to a T that has been rooted elsewhere. This is most useful
as a parameter type, which guarantees that the T lvalue is properly
rooted. See “Move GC Stack Rooting” above.
If you want to add additional methods to Handle for a specific
specialization, define a HandleOperations specialization containing them.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
The resulting type after dereferencing.
Dereferences the value.
Converts to this type from the input type.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.