pub enum HandleId {
FromPath(TypeId, u64),
FromU64(TypeId, u64),
}Expand description
A unique asset id
Variants§
Implementations§
Source§impl HandleId
impl HandleId
Sourcepub fn new_from_path<T: Asset>(asset_path: &AssetPath) -> Self
pub fn new_from_path<T: Asset>(asset_path: &AssetPath) -> Self
Creates a new HandleId from a given AssetPath
Sourcepub fn new_from_u64<T: Asset>(id: u64) -> Self
pub fn new_from_u64<T: Asset>(id: u64) -> Self
Creates a new HandleId from a given u64
Sourcepub fn clone_with_different_type<T: Asset>(&self) -> Self
pub fn clone_with_different_type<T: Asset>(&self) -> Self
Clone and HandleId using a different TypeId
Trait Implementations§
Source§impl Ord for HandleId
impl Ord for HandleId
Source§impl PartialOrd for HandleId
impl PartialOrd for HandleId
impl Copy for HandleId
impl Eq for HandleId
impl StructuralPartialEq for HandleId
Auto Trait Implementations§
impl Freeze for HandleId
impl RefUnwindSafe for HandleId
impl Send for HandleId
impl Sync for HandleId
impl Unpin for HandleId
impl UnwindSafe for HandleId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.