pub struct Handle<T> { /* private fields */ }Expand description
A reference to an ID referring to an item in the compiler instance.
The usage of Handle<T> ensures that item IDs can not be forged from
a different compiler instance or from a u32.
Implementations§
Trait Implementations§
Source§impl<'a, 'b> From<&'a BuiltinResource<'b>> for Handle<VariableId>
impl<'a, 'b> From<&'a BuiltinResource<'b>> for Handle<VariableId>
Source§fn from(value: &'a BuiltinResource<'b>) -> Self
fn from(value: &'a BuiltinResource<'b>) -> Self
Converts to this type from the input type.
Source§impl From<BuiltinResource<'_>> for Handle<VariableId>
impl From<BuiltinResource<'_>> for Handle<VariableId>
Source§fn from(value: BuiltinResource<'_>) -> Self
fn from(value: BuiltinResource<'_>) -> Self
Converts to this type from the input type.
Source§impl From<Handle<ConstantId>> for DecorationValue<'_>
impl From<Handle<ConstantId>> for DecorationValue<'_>
Source§fn from(value: Handle<ConstantId>) -> Self
fn from(value: Handle<ConstantId>) -> Self
Converts to this type from the input type.
impl<T: Copy> Copy for Handle<T>
impl<T: Eq> Eq for Handle<T>
impl<T> StructuralPartialEq for Handle<T>
Auto Trait Implementations§
impl<T> Freeze for Handle<T>where
T: Freeze,
impl<T> RefUnwindSafe for Handle<T>where
T: RefUnwindSafe,
impl<T> Send for Handle<T>where
T: Send,
impl<T> Sync for Handle<T>where
T: Sync,
impl<T> Unpin for Handle<T>where
T: Unpin,
impl<T> UnwindSafe for Handle<T>where
T: UnwindSafe,
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