pub struct TextureLoader {
pub default_import_options: TextureImportOptions,
}Expand description
Default implementation for texture loading.
Fields§
§default_import_options: TextureImportOptionsDefault import options for textures.
Trait Implementations§
Source§impl ResourceLoader for TextureLoader
impl ResourceLoader for TextureLoader
Source§fn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
Returns a list of file extensions supported by the loader. Resource manager will use this list
to pick the correct resource loader when the user requests a resource.
Source§fn data_type_uuid(&self) -> Uuid
fn data_type_uuid(&self) -> Uuid
Must return a type uuid of the resource data type.
Source§fn load(&self, path: PathBuf, io: Arc<dyn ResourceIo>) -> BoxedLoaderFuture
fn load(&self, path: PathBuf, io: Arc<dyn ResourceIo>) -> BoxedLoaderFuture
Loads or reloads a resource.
Source§fn try_load_import_settings(
&self,
resource_path: PathBuf,
io: Arc<dyn ResourceIo>,
) -> BoxedImportOptionsLoaderFuture
fn try_load_import_settings( &self, resource_path: PathBuf, io: Arc<dyn ResourceIo>, ) -> BoxedImportOptionsLoaderFuture
Tries to load import settings for a resource.
Source§fn default_import_options(&self) -> Option<Box<dyn BaseImportOptions>>
fn default_import_options(&self) -> Option<Box<dyn BaseImportOptions>>
Returns default import options for the resource.
Source§fn supports_extension(&self, ext: &str) -> bool
fn supports_extension(&self, ext: &str) -> bool
Checks if the given extension is supported by this loader. Comparison is case-insensitive.
Auto Trait Implementations§
impl Freeze for TextureLoader
impl RefUnwindSafe for TextureLoader
impl Send for TextureLoader
impl Sync for TextureLoader
impl Unpin for TextureLoader
impl UnwindSafe for TextureLoader
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts self reference as a reference to
Any. Could be used to downcast a trait object
to a particular type.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts self reference as a reference to
Any. Could be used to downcast a trait object
to a particular type.fn into_any(self: Box<T>) -> Box<dyn Any>
Source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.