pub struct HierarchyCache { /* private fields */ }Expand description
Incrementally-loaded hierarchy cache.
Implementations§
Source§impl HierarchyCache
impl HierarchyCache
Sourcepub async fn load_root(
&mut self,
source: &impl ByteSource,
info: &CopcInfo,
) -> Result<(), CopcError>
pub async fn load_root( &mut self, source: &impl ByteSource, info: &CopcInfo, ) -> Result<(), CopcError>
Load the root hierarchy page.
Sourcepub async fn load_pending_pages(
&mut self,
source: &impl ByteSource,
) -> Result<(), CopcError>
pub async fn load_pending_pages( &mut self, source: &impl ByteSource, ) -> Result<(), CopcError>
Load the next batch of pending hierarchy pages.
Sourcepub async fn load_all(
&mut self,
source: &impl ByteSource,
info: &CopcInfo,
) -> Result<(), CopcError>
pub async fn load_all( &mut self, source: &impl ByteSource, info: &CopcInfo, ) -> Result<(), CopcError>
Load all pending pages (breadth-first).
Sourcepub fn has_pending_pages(&self) -> bool
pub fn has_pending_pages(&self) -> bool
Whether there are unloaded hierarchy pages.
Sourcepub fn get(&self, key: &VoxelKey) -> Option<&HierarchyEntry>
pub fn get(&self, key: &VoxelKey) -> Option<&HierarchyEntry>
Look up a hierarchy entry by key.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&VoxelKey, &HierarchyEntry)>
pub fn iter(&self) -> impl Iterator<Item = (&VoxelKey, &HierarchyEntry)>
Iterate all loaded entries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HierarchyCache
impl RefUnwindSafe for HierarchyCache
impl Send for HierarchyCache
impl Sync for HierarchyCache
impl Unpin for HierarchyCache
impl UnsafeUnpin for HierarchyCache
impl UnwindSafe for HierarchyCache
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