pub struct DefaultBytesLoader { /* private fields */ }
Expand description
Maps URI:s to Bytes
, e.g. found with include_bytes!
.
By convention, the URI:s should be prefixed with bytes://
.
Implementations§
Trait Implementations§
Source§impl BytesLoader for DefaultBytesLoader
impl BytesLoader for DefaultBytesLoader
Source§fn load(&self, _: &Context, uri: &str) -> BytesLoadResult
fn load(&self, _: &Context, uri: &str) -> BytesLoadResult
Try loading the bytes from the given uri. Read more
Source§fn forget_all(&self)
fn forget_all(&self)
Forget all URIs ever given to this loader. Read more
Source§fn byte_size(&self) -> usize
fn byte_size(&self) -> usize
If the loader caches any data, this should return the size of that cache.
Source§fn end_pass(&self, pass_index: u64)
fn end_pass(&self, pass_index: u64)
Implementations may use this to perform work at the end of a frame,
such as evicting unused entries from a cache.
Source§fn has_pending(&self) -> bool
fn has_pending(&self) -> bool
Returns
true
if some data is currently being loaded.Source§impl Default for DefaultBytesLoader
impl Default for DefaultBytesLoader
Source§fn default() -> DefaultBytesLoader
fn default() -> DefaultBytesLoader
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DefaultBytesLoader
impl !RefUnwindSafe for DefaultBytesLoader
impl Send for DefaultBytesLoader
impl Sync for DefaultBytesLoader
impl Unpin for DefaultBytesLoader
impl UnwindSafe for DefaultBytesLoader
Blanket Implementations§
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