Struct bevy_asset::HandleUntyped
source · pub struct HandleUntyped { /* private fields */ }
Expand description
Implementations§
source§impl HandleUntyped
impl HandleUntyped
sourcepub const fn weak_from_u64(uuid: Uuid, id: u64) -> Self
pub const fn weak_from_u64(uuid: Uuid, id: u64) -> Self
Creates a weak untyped handle with an arbitrary id.
sourcepub fn weak(id: HandleId) -> Self
pub fn weak(id: HandleId) -> Self
Create a weak, untyped handle into an Asset identified by id
.
sourcepub fn clone_weak(&self) -> Self
pub fn clone_weak(&self) -> Self
Creates a weak copy of this handle.
sourcepub fn typed_weak<T: Asset>(&self) -> Handle<T>
pub fn typed_weak<T: Asset>(&self) -> Handle<T>
Create a weak typed Handle
from this handle.
If this handle is strong and dropped, there is no guarantee that the asset will still be available (if only the returned handle is kept)
Trait Implementations§
source§impl Clone for HandleUntyped
impl Clone for HandleUntyped
source§impl Debug for HandleUntyped
impl Debug for HandleUntyped
source§impl Drop for HandleUntyped
impl Drop for HandleUntyped
source§impl From<&HandleUntyped> for HandleId
impl From<&HandleUntyped> for HandleId
source§fn from(value: &HandleUntyped) -> Self
fn from(value: &HandleUntyped) -> Self
Converts to this type from the input type.
source§impl From<HandleUntyped> for HandleId
impl From<HandleUntyped> for HandleId
source§fn from(value: HandleUntyped) -> Self
fn from(value: HandleUntyped) -> Self
Converts to this type from the input type.
source§impl Hash for HandleUntyped
impl Hash for HandleUntyped
source§impl PartialEq<HandleUntyped> for HandleUntyped
impl PartialEq<HandleUntyped> for HandleUntyped
impl Eq for HandleUntyped
Auto Trait Implementations§
impl RefUnwindSafe for HandleUntyped
impl Send for HandleUntyped
impl Sync for HandleUntyped
impl Unpin for HandleUntyped
impl UnwindSafe for HandleUntyped
Blanket Implementations§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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 + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.