[−][src]Struct bevy_asset::prelude::Handle
A handle into a specific Asset of type T
Handles contain a unique id that corresponds to a specific asset in the Assets collection.
Fields
id: HandleId
Implementations
impl<T> Handle<T>
[src]
pub fn new() -> Self
[src]
pub fn as_handle<U>(&self) -> Handle<U>
[src]
Gets a handle for the given type that has this handle's id. This is useful when an asset is derived from another asset. In this case, a common handle can be used to correlate them. NOTE: This pattern might eventually be replaced by a more formal asset dependency system.
pub const fn from_id(id: HandleId) -> Self
[src]
pub const fn from_u128(value: u128) -> Self
[src]
pub const fn from_bytes(bytes: [u8; 16]) -> Self
[src]
pub fn from_untyped(untyped_handle: HandleUntyped) -> Option<Handle<T>> where
T: 'static,
[src]
T: 'static,
Trait Implementations
impl<T> Clone for Handle<T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Copy for Handle<T>
[src]
impl<T> Debug for Handle<T>
[src]
impl<T> Default for Handle<T>
[src]
impl<T> DeserializeProperty for Handle<T>
[src]
fn deserialize(
deserializer: &mut dyn Deserializer<'_>,
property_type_registry: &PropertyTypeRegistry
) -> Result<Box<dyn Property>, Error>
[src]
deserializer: &mut dyn Deserializer<'_>,
property_type_registry: &PropertyTypeRegistry
) -> Result<Box<dyn Property>, Error>
impl<T> Eq for Handle<T>
[src]
impl<T> From<[u8; 16]> for Handle<T>
[src]
impl<T> From<Handle<T>> for HandleUntyped where
T: 'static,
[src]
T: 'static,
impl<T> From<HandleId> for Handle<T>
[src]
impl<T> From<HandleUntyped> for Handle<T> where
T: 'static,
[src]
T: 'static,
fn from(handle: HandleUntyped) -> Self
[src]
impl<T> From<u128> for Handle<T>
[src]
impl<T> Hash for Handle<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> PartialEq<Handle<T>> for Handle<T>
[src]
impl<T> Properties for Handle<T>
[src]
fn prop(&self, name: &str) -> Option<&dyn Property>
[src]
fn prop_mut(&mut self, name: &str) -> Option<&mut dyn Property>
[src]
fn prop_with_index(&self, index: usize) -> Option<&dyn Property>
[src]
fn prop_with_index_mut(&mut self, index: usize) -> Option<&mut dyn Property>
[src]
fn prop_name(&self, index: usize) -> Option<&str>
[src]
fn prop_len(&self) -> usize
[src]
fn iter_props(&self) -> PropertyIter<'_>
[src]
fn set_prop(&mut self, name: &str, value: &(dyn Property + 'static))
[src]
fn to_dynamic(&self) -> DynamicProperties
[src]
impl<T> Property for Handle<T>
[src]
fn type_name(&self) -> &str
[src]
fn any(&self) -> &dyn Any
[src]
fn any_mut(&mut self) -> &mut dyn Any
[src]
fn clone_prop(&self) -> Box<dyn Property>
[src]
fn set(&mut self, value: &dyn Property)
[src]
fn apply(&mut self, value: &dyn Property)
[src]
fn as_properties(&self) -> Option<&dyn Properties>
[src]
fn serializable<'a>(
&'a self,
registry: &'a PropertyTypeRegistry
) -> Serializable<'a>
[src]
&'a self,
registry: &'a PropertyTypeRegistry
) -> Serializable<'a>
fn property_type(&self) -> PropertyType
[src]
impl<T> Send for Handle<T>
[src]
impl<T> Sync for Handle<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Handle<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Unpin for Handle<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Handle<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> From<T> for T
[src]
impl<T> FromResources for T where
T: Default,
[src]
T: Default,
fn from_resources(_resources: &Resources) -> T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<P> PropertiesVal for P where
P: Properties,
[src]
P: Properties,
fn prop_val<T>(&self, name: &str) -> Option<&T> where
T: 'static,
[src]
T: 'static,
fn set_prop_val<T>(&mut self, name: &str, value: T) where
T: 'static,
[src]
T: 'static,
impl<T> Resource for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,