Module io

Source

Modules§

embedded
fileNon-WebAssembly
gated
memory
processor_gated

Structs§

AssetSource
A collection of unprocessed and processed AssetReader, AssetWriter, and AssetWatcher instances for a specific asset source, identified by an AssetSourceId.
AssetSourceBuilder
Metadata about an “asset source”, such as how to construct the AssetReader and AssetWriter for the source, and whether or not the source is processed.
AssetSourceBuilders
A Resource that hold (repeatable) functions capable of producing new AssetReader and AssetWriter instances for a given asset source.
AssetSources
A collection of AssetSources.
MissingAssetSourceError
An error returned when an AssetSource does not exist for a given id.
MissingAssetWriterError
An error returned when an AssetWriter does not exist for a given id.
MissingProcessedAssetReaderError
An error returned when a processed AssetReader does not exist for a given id.
MissingProcessedAssetWriterError
An error returned when a processed AssetWriter does not exist for a given id.
SeekForwardFuture
SliceReader
An AsyncRead implementation capable of reading a [&[u8]].
StackFuture
A wrapper that stores a future in space allocated by the container
VecReader
An AsyncRead implementation capable of reading a Vec<u8>.

Enums§

AssetReaderError
Errors that occur while loading assets.
AssetSourceEvent
An “asset source change event” that occurs whenever asset (or asset metadata) is created/added/removed
AssetSourceId
A reference to an “asset source”, which maps to an AssetReader and/or AssetWriter.
AssetWriterError
Errors that occur while loading assets.

Constants§

STACK_FUTURE_SIZE
The maximum size of a future returned from Reader::read_to_end. This is large enough to fit ten references.

Traits§

AssetReader
Performs read operations on an asset storage. AssetReader exposes a “virtual filesystem” API, where asset bytes and asset metadata bytes are both stored and accessible for a given path. This trait is not object safe, if needed use a dyn ErasedAssetReader instead.
AssetReaderFuture
A future that returns a value or an AssetReaderError
AssetWatcher
A handle to an “asset watcher” process, that will listen for and emit AssetSourceEvent values for as long as AssetWatcher has not been dropped.
AssetWriter
Preforms write operations on an asset storage. AssetWriter exposes a “virtual filesystem” API, where asset bytes and asset metadata bytes are both stored and accessible for a given path. This trait is not object safe, if needed use a dyn ErasedAssetWriter instead.
AsyncSeekForward
Asynchronously advances the cursor position by a specified number of bytes.
AsyncSeekForwardExt
Extension trait for AsyncSeekForward.
AsyncWriteExt
Extension trait for AsyncWrite.
ErasedAssetReader
Equivalent to an AssetReader but using boxed futures, necessary eg. when using a dyn AssetReader, as AssetReader isn’t currently object safe.
ErasedAssetWriter
Equivalent to an AssetWriter but using boxed futures, necessary eg. when using a dyn AssetWriter, as AssetWriter isn’t currently object safe.
Reader
A type returned from AssetReader::read, which is used to read the contents of a file (or virtual file) corresponding to an asset.

Type Aliases§

PathStream
Writer