pub struct TextureRegistry<V = TextureView> { /* private fields */ }Expand description
The engine’s live map from a minted SceneTextureId to the view
Command::SceneTexture resolves against.
Generic over the stored view type (default wgpu::TextureView, the real
engine’s usage) rather than hardcoded to it, so the registry’s own
insert/get/remove behavior stays host-testable with a plain stand-in
value — no GPU device needed to exercise the map logic itself.
Implementations§
Source§impl<V> TextureRegistry<V>
impl<V> TextureRegistry<V>
Sourcepub fn insert(&mut self, id: SceneTextureId, view: V) -> Option<V>
pub fn insert(&mut self, id: SceneTextureId, view: V) -> Option<V>
Inserts (or replaces) the view registered under id, returning the
previous entry, if any.
Sourcepub fn get(&self, id: SceneTextureId) -> Option<&V>
pub fn get(&self, id: SceneTextureId) -> Option<&V>
The view registered under id, if any.
Sourcepub fn remove(&mut self, id: SceneTextureId) -> Option<V>
pub fn remove(&mut self, id: SceneTextureId) -> Option<V>
Removes and returns the view registered under id, if any.
Trait Implementations§
Source§impl<V: Debug> Debug for TextureRegistry<V>
impl<V: Debug> Debug for TextureRegistry<V>
Auto Trait Implementations§
impl<V> Freeze for TextureRegistry<V>
impl<V> RefUnwindSafe for TextureRegistry<V>
impl<V> Send for TextureRegistry<V>
impl<V> Sync for TextureRegistry<V>
impl<V> Unpin for TextureRegistry<V>
impl<V> UnsafeUnpin for TextureRegistry<V>
impl<V> UnwindSafe for TextureRegistry<V>
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