VOXEL_COLLIDER_MANIFEST

Struct VOXEL_COLLIDER_MANIFEST 

Source
pub struct VOXEL_COLLIDER_MANIFEST {
    __private_field: (),
}

Fields§

§__private_field: ()

Methods from Deref<Target = AssetHandle<ShipSpec>>§

pub fn type_id(&self) -> TypeId

Gets the TypeId of the underlying type.

pub fn is<T>(&self) -> bool
where T: 'static,

Returns true if the inner type is the same as T.

pub fn downcast_ref<T>(&self) -> Option<&Handle<T>>
where T: Storable,

Returns a handle to the asset if it is of type T.

pub fn read(&self) -> AssetReadGuard<'_, T>

Locks the pointed asset for reading.

If hot-reloading is disabled for T or globally, no reloading can occur so there is no actual lock. In these cases, calling this function does not involve synchronisation.

Returns a RAII guard which will release the lock once dropped.

pub fn id(&self) -> &SharedString

Returns the id of the asset.

pub fn as_untyped(&self) -> &Handle<dyn Any + Sync + Send>
where T: Storable,

Returns an untyped version of the handle.

pub fn strong(&self) -> ArcHandle<T>

Make a ArcHandle that points to this handle.

pub fn weak(&self) -> WeakHandle<T>

Make a WeakHandle that points to this handle.

pub fn strong_count(&self) -> usize

Gets the number of strong ([ArcHandle]) pointers to this allocation.

pub fn weak_count(&self) -> usize

Gets the number of [WeakHandle] pointers to this allocation.

pub fn reload_watcher(&self) -> ReloadWatcher<'_>

Returns a ReloadWatcher that can be used to check whether this asset was reloaded.

§Example
use assets_manager::{AssetCache, ReloadWatcher};

let cache = AssetCache::new("assets")?;
let asset = cache.load::<String>("common.some_text")?;
let mut watcher = asset.reload_watcher();

// The handle has just been created, so `reloaded` returns false
assert!(!watcher.reloaded());

loop {
    if watcher.reloaded() {
        println!("The asset was reloaded !")
    }
}

pub fn last_reload_id(&self) -> ReloadId

Returns the last ReloadId associated with this asset.

It is only meaningful when compared to other ReloadIds returned by the same handle or to [ReloadId::NEVER].

pub fn reloaded_global(&self) -> bool

Returns true if the asset has been reloaded since last call to this method with any handle on this asset.

Note that this method and reload_watcher are totally independant, and the result of the two functions do not depend on whether the other was called.

pub fn copied(&self) -> T

Returns a copy of the inner asset.

This is functionnally equivalent to cloned, but it ensures that no expensive operation is used (eg if a type is refactored).

pub fn cloned(&self) -> T

Returns a clone of the inner asset.

Trait Implementations§

Source§

impl Deref for VOXEL_COLLIDER_MANIFEST

Source§

type Target = &'static Handle<ShipSpec>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &AssetHandle<ShipSpec>

Dereferences the value.
Source§

impl LazyStatic for VOXEL_COLLIDER_MANIFEST

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<Context> SubContext<Context> for Context

Source§

fn sub_context(self) -> Context

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Event for T
where T: Send + Sync + 'static,

§

impl<T> Resource for T
where T: Any + Send + Sync,

§

impl<T> Storable for T
where T: Send + Sync + 'static,