[−]Struct bevy::prelude::AssetServer
Loads assets from the filesystem on background threads
Implementations
impl AssetServer
pub fn new<T>(source_io: T, task_pool: TaskPool) -> AssetServer where
T: AssetIo,
T: AssetIo,
pub fn with_boxed_io(
asset_io: Box<dyn AssetIo + 'static, Global>,
task_pool: TaskPool
) -> AssetServer
asset_io: Box<dyn AssetIo + 'static, Global>,
task_pool: TaskPool
) -> AssetServer
pub fn add_loader<T>(&self, loader: T) where
T: AssetLoader,
T: AssetLoader,
pub fn watch_for_changes(&self) -> Result<(), AssetServerError>
pub fn get_handle<T, I>(&self, id: I) -> Handle<T> where
T: Asset,
I: Into<HandleId>,
T: Asset,
I: Into<HandleId>,
pub fn get_handle_untyped<I>(&self, id: I) -> HandleUntyped where
I: Into<HandleId>,
I: Into<HandleId>,
pub fn get_handle_path<H>(&self, handle: H) -> Option<AssetPath<'_>> where
H: Into<HandleId>,
H: Into<HandleId>,
pub fn get_load_state<H>(&self, handle: H) -> LoadState where
H: Into<HandleId>,
H: Into<HandleId>,
pub fn get_group_load_state(
&self,
handles: impl IntoIterator<Item = HandleId>
) -> LoadState
&self,
handles: impl IntoIterator<Item = HandleId>
) -> LoadState
pub fn load<'a, T, P>(&self, path: P) -> Handle<T> where
P: Into<AssetPath<'a>>,
T: Asset,
P: Into<AssetPath<'a>>,
T: Asset,
pub fn load_untyped<'a, P>(&self, path: P) -> HandleUntyped where
P: Into<AssetPath<'a>>,
P: Into<AssetPath<'a>>,
pub fn load_folder<P>(
&self,
path: P
) -> Result<Vec<HandleUntyped, Global>, AssetServerError> where
P: AsRef<Path>,
&self,
path: P
) -> Result<Vec<HandleUntyped, Global>, AssetServerError> where
P: AsRef<Path>,
pub fn free_unused_assets(&self)
Trait Implementations
impl Clone for AssetServer
pub fn clone(&self) -> AssetServer
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for AssetServer
[src]
impl Send for AssetServer
[src]
impl Sync for AssetServer
[src]
impl Unpin for AssetServer
[src]
impl !UnwindSafe for AssetServer
[src]
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,
pub 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> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
T: 'static + Send + Sync + Clone,
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,