Struct bevy::pbr::experimental::meshlet::MeshletMeshSaverLoad
pub struct MeshletMeshSaverLoad;
Available on crate feature
meshlet
only.Expand description
An AssetLoader
and AssetSaver
for .meshlet_mesh
MeshletMesh
assets.
Trait Implementations§
§impl AssetLoader for MeshletMeshSaverLoad
impl AssetLoader for MeshletMeshSaverLoad
§type Asset = MeshletMesh
type Asset = MeshletMesh
The top level
Asset
loaded by this AssetLoader
.§type Settings = ()
type Settings = ()
The settings type used by this
AssetLoader
.§type Error = MeshletMeshSaveOrLoadError
type Error = MeshletMeshSaveOrLoadError
The type of error which could be encountered by this loader.
§async fn load<'a>(
&'a self,
reader: &'a mut (dyn AsyncReadAndSeek + Unpin + Sync + Send + '_),
_settings: &'a <MeshletMeshSaverLoad as AssetLoader>::Settings,
_load_context: &'a mut LoadContext<'_>
) -> Result<<MeshletMeshSaverLoad as AssetLoader>::Asset, <MeshletMeshSaverLoad as AssetLoader>::Error>
async fn load<'a>( &'a self, reader: &'a mut (dyn AsyncReadAndSeek + Unpin + Sync + Send + '_), _settings: &'a <MeshletMeshSaverLoad as AssetLoader>::Settings, _load_context: &'a mut LoadContext<'_> ) -> Result<<MeshletMeshSaverLoad as AssetLoader>::Asset, <MeshletMeshSaverLoad as AssetLoader>::Error>
Asynchronously loads
AssetLoader::Asset
(and any other labeled assets) from the bytes provided by Reader
.§fn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
Returns a list of extensions supported by this
AssetLoader
, without the preceding dot.
Note that users of this AssetLoader
may choose to load files with a non-matching extension.§impl AssetSaver for MeshletMeshSaverLoad
impl AssetSaver for MeshletMeshSaverLoad
§type Asset = MeshletMesh
type Asset = MeshletMesh
The top level
Asset
saved by this AssetSaver
.§type Settings = ()
type Settings = ()
The settings type used by this
AssetSaver
.§type OutputLoader = MeshletMeshSaverLoad
type OutputLoader = MeshletMeshSaverLoad
The type of
AssetLoader
used to load this Asset
§type Error = MeshletMeshSaveOrLoadError
type Error = MeshletMeshSaveOrLoadError
The type of error which could be encountered by this saver.
§async fn save<'a>(
&'a self,
writer: &'a mut (dyn AsyncWrite + Unpin + Sync + Send + 'static),
asset: SavedAsset<'a, <MeshletMeshSaverLoad as AssetSaver>::Asset>,
_settings: &'a <MeshletMeshSaverLoad as AssetSaver>::Settings
) -> Result<(), <MeshletMeshSaverLoad as AssetSaver>::Error>
async fn save<'a>( &'a self, writer: &'a mut (dyn AsyncWrite + Unpin + Sync + Send + 'static), asset: SavedAsset<'a, <MeshletMeshSaverLoad as AssetSaver>::Asset>, _settings: &'a <MeshletMeshSaverLoad as AssetSaver>::Settings ) -> Result<(), <MeshletMeshSaverLoad as AssetSaver>::Error>
Saves the given runtime
Asset
by writing it to a byte format using writer
. The passed in settings
can influence how the
asset
is saved. Auto Trait Implementations§
impl Freeze for MeshletMeshSaverLoad
impl RefUnwindSafe for MeshletMeshSaverLoad
impl Send for MeshletMeshSaverLoad
impl Sync for MeshletMeshSaverLoad
impl Unpin for MeshletMeshSaverLoad
impl UnwindSafe for MeshletMeshSaverLoad
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<L> ErasedAssetLoader for L
impl<L> ErasedAssetLoader for L
§fn load<'a>(
&'a self,
reader: &'a mut (dyn AsyncReadAndSeek + Unpin + Sync + Send + '_),
meta: Box<dyn AssetMetaDyn>,
load_context: LoadContext<'a>
) -> Pin<Box<dyn ConditionalSendFuture<Output = Result<ErasedLoadedAsset, Box<dyn Error + Sync + Send>>> + 'a>>
fn load<'a>( &'a self, reader: &'a mut (dyn AsyncReadAndSeek + Unpin + Sync + Send + '_), meta: Box<dyn AssetMetaDyn>, load_context: LoadContext<'a> ) -> Pin<Box<dyn ConditionalSendFuture<Output = Result<ErasedLoadedAsset, Box<dyn Error + Sync + Send>>> + 'a>>
Processes the asset in an asynchronous closure.
§fn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
Returns a list of extensions supported by this asset loader, without the preceding dot.
§fn deserialize_meta(
&self,
meta: &[u8]
) -> Result<Box<dyn AssetMetaDyn>, DeserializeMetaError>
fn deserialize_meta( &self, meta: &[u8] ) -> Result<Box<dyn AssetMetaDyn>, DeserializeMetaError>
Deserializes metadata from the input
meta
bytes into the appropriate type (erased as Box<dyn AssetMetaDyn>
).§fn default_meta(&self) -> Box<dyn AssetMetaDyn>
fn default_meta(&self) -> Box<dyn AssetMetaDyn>
Returns the default meta value for the
AssetLoader
(erased as Box<dyn AssetMetaDyn>
).§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Returns the type name of the
AssetLoader
.§fn type_id(&self) -> TypeId
fn type_id(&self) -> TypeId
Returns the
TypeId
of the AssetLoader
.§fn asset_type_name(&self) -> &'static str
fn asset_type_name(&self) -> &'static str
Returns the type name of the top-level
Asset
loaded by the AssetLoader
.§fn asset_type_id(&self) -> TypeId
fn asset_type_id(&self) -> TypeId
§impl<S> ErasedAssetSaver for Swhere
S: AssetSaver,
impl<S> ErasedAssetSaver for Swhere
S: AssetSaver,
§fn save<'a>(
&'a self,
writer: &'a mut (dyn AsyncWrite + Unpin + Sync + Send + 'static),
asset: &'a ErasedLoadedAsset,
settings: &'a (dyn Settings + 'static)
) -> Pin<Box<dyn ConditionalSendFuture<Output = Result<(), Box<dyn Error + Sync + Send>>> + 'a>>
fn save<'a>( &'a self, writer: &'a mut (dyn AsyncWrite + Unpin + Sync + Send + 'static), asset: &'a ErasedLoadedAsset, settings: &'a (dyn Settings + 'static) ) -> Pin<Box<dyn ConditionalSendFuture<Output = Result<(), Box<dyn Error + Sync + Send>>> + 'a>>
Saves the given runtime
ErasedLoadedAsset
by writing it to a byte format using writer
. The passed in settings
can influence how the
asset
is saved. §fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
The type name of the
AssetSaver
.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more