pub struct TemporalCache { /* private fields */ }Expand description
Incrementally-loaded temporal index cache.
Implementations§
Source§impl TemporalCache
impl TemporalCache
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.
Sourcepub async fn query(
&mut self,
source: &impl ByteSource,
start: GpsTime,
end: GpsTime,
) -> Result<Vec<&NodeTemporalEntry>, TemporalError>
pub async fn query( &mut self, source: &impl ByteSource, start: GpsTime, end: GpsTime, ) -> Result<Vec<&NodeTemporalEntry>, TemporalError>
Load relevant pages and return all nodes that overlap a time range.
This is the primary query method — it ensures the right pages are loaded
before returning results. Equivalent to calling load_pages_for_time_range
followed by nodes_in_range, but cannot return incomplete results.
Sourcepub fn get(&self, key: &VoxelKey) -> Option<&NodeTemporalEntry>
pub fn get(&self, key: &VoxelKey) -> Option<&NodeTemporalEntry>
Look up the temporal entry for a node.
Sourcepub fn nodes_in_range(
&self,
start: GpsTime,
end: GpsTime,
) -> Vec<&NodeTemporalEntry>
pub fn nodes_in_range( &self, start: GpsTime, end: GpsTime, ) -> Vec<&NodeTemporalEntry>
Return all loaded nodes whose time range overlaps [start, end].
Sourcepub fn header(&self) -> Option<&TemporalHeader>
pub fn header(&self) -> Option<&TemporalHeader>
The parsed temporal index header, if loaded.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&VoxelKey, &NodeTemporalEntry)>
pub fn iter(&self) -> impl Iterator<Item = (&VoxelKey, &NodeTemporalEntry)>
Iterate all loaded entries.