pub struct TemporalCache { /* private fields */ }Expand description
Incrementally-loaded temporal index cache.
Implementations§
Source§impl TemporalCache
impl TemporalCache
pub fn new() -> Self
Sourcepub async fn from_reader<S: ByteSource>(
reader: &CopcStreamingReader<S>,
) -> Result<Option<Self>, TemporalError>
pub async fn from_reader<S: ByteSource>( reader: &CopcStreamingReader<S>, ) -> Result<Option<Self>, TemporalError>
Open the temporal index from a COPC reader.
Loads the temporal header and root page. Returns Ok(None) if
no temporal EVLR exists in the file.
Sourcepub async fn load_header(
&mut self,
source: &impl ByteSource,
evlr_offset: u64,
evlr_count: u32,
) -> Result<bool, TemporalError>
pub async fn load_header( &mut self, source: &impl ByteSource, evlr_offset: u64, evlr_count: u32, ) -> Result<bool, TemporalError>
Scan EVLRs to find the temporal EVLR and read its header. Returns false if no temporal EVLR exists.
Sourcepub async fn load_root_page(
&mut self,
source: &impl ByteSource,
) -> Result<(), TemporalError>
pub async fn load_root_page( &mut self, source: &impl ByteSource, ) -> Result<(), TemporalError>
Load the root temporal page.
Sourcepub async fn load_pages_for_time_range(
&mut self,
source: &impl ByteSource,
start: GpsTime,
end: GpsTime,
) -> Result<(), TemporalError>
pub async fn load_pages_for_time_range( &mut self, source: &impl ByteSource, start: GpsTime, end: GpsTime, ) -> Result<(), TemporalError>
Load child pages that overlap a time range, pruning by subtree bounds.
Sourcepub async fn load_all_pages(
&mut self,
source: &impl ByteSource,
) -> Result<(), TemporalError>
pub async fn load_all_pages( &mut self, source: &impl ByteSource, ) -> Result<(), TemporalError>
Load ALL pending pages.
pub fn get(&self, key: &VoxelKey) -> Option<&NodeTemporalEntry>
pub fn nodes_in_range( &self, start: GpsTime, end: GpsTime, ) -> Vec<&NodeTemporalEntry>
pub fn stride(&self) -> u32
pub fn header(&self) -> Option<&TemporalHeader>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn iter(&self) -> impl Iterator<Item = (&VoxelKey, &NodeTemporalEntry)>
pub fn iter(&self) -> impl Iterator<Item = (&VoxelKey, &NodeTemporalEntry)>
Iterate all loaded entries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TemporalCache
impl RefUnwindSafe for TemporalCache
impl Send for TemporalCache
impl Sync for TemporalCache
impl Unpin for TemporalCache
impl UnsafeUnpin for TemporalCache
impl UnwindSafe for TemporalCache
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