pub struct StreamIndex3D<R> { /* private fields */ }stream only.Expand description
Streaming reader for a 3D f64 packed spatial index.
The 3D counterpart of StreamIndex2D: it shares the same open, validation,
directory prefetch, and coalesced traversal, differing only in the 48-byte
box record. See StreamIndex2D for the streaming model.
Implementations§
Source§impl<R: AsyncRangeReader> StreamIndex3D<R>
Streaming reader for a 3D f64 index over async I/O. See StreamIndex2D’s
async methods. Behind the async feature.
impl<R: AsyncRangeReader> StreamIndex3D<R>
Streaming reader for a 3D f64 index over async I/O. See StreamIndex2D’s
async methods. Behind the async feature.
Sourcepub async fn open_async(reader: R) -> Result<Self, StreamError>
Available on crate feature async only.
pub async fn open_async(reader: R) -> Result<Self, StreamError>
async only.Open and validate a 3D f64 index from an async reader.
Sourcepub async fn open_with_limits_async(
reader: R,
limits: StreamLimits,
) -> Result<Self, StreamError>
Available on crate feature async only.
pub async fn open_with_limits_async( reader: R, limits: StreamLimits, ) -> Result<Self, StreamError>
async only.Open from an async reader with per-query StreamLimits.
Sourcepub async fn search_async(
&self,
query: Box3D,
) -> Result<Vec<usize>, StreamError>
Available on crate feature async only.
pub async fn search_async( &self, query: Box3D, ) -> Result<Vec<usize>, StreamError>
async only.Stream the indices of every item whose box intersects query.
Sourcepub async fn search_payloads_async(
&self,
query: Box3D,
) -> Result<Vec<(usize, Vec<u8>)>, StreamError>
Available on crate feature async only.
pub async fn search_payloads_async( &self, query: Box3D, ) -> Result<Vec<(usize, Vec<u8>)>, StreamError>
async only.Stream (item index, payload blob) for every item intersecting query.
Sourcepub fn has_payload_async(&self) -> bool
Available on crate feature async only.
pub fn has_payload_async(&self) -> bool
async only.Whether this index was written with a payload section.
Source§impl<R> StreamIndex3D<R>
impl<R> StreamIndex3D<R>
Sourcepub fn into_directory(self) -> (StreamDirectory, R)
pub fn into_directory(self) -> (StreamDirectory, R)
Split off the reader, keeping the reusable StreamDirectory. No I/O.
Sourcepub fn from_directory(
dir: &StreamDirectory,
reader: R,
) -> Result<Self, StreamError>
pub fn from_directory( dir: &StreamDirectory, reader: R, ) -> Result<Self, StreamError>
Rebuild a 3D f64 index from a cached directory and a fresh reader. No I/O.
Sourcepub fn from_directory_with_limits(
dir: &StreamDirectory,
reader: R,
limits: StreamLimits,
) -> Result<Self, StreamError>
pub fn from_directory_with_limits( dir: &StreamDirectory, reader: R, limits: StreamLimits, ) -> Result<Self, StreamError>
from_directory with per-query StreamLimits.
Source§impl<R: RangeReader> StreamIndex3D<R>
impl<R: RangeReader> StreamIndex3D<R>
Sourcepub fn open(reader: R) -> Result<Self, StreamError>
pub fn open(reader: R) -> Result<Self, StreamError>
Open and validate a 3D f64 index from reader.
Sourcepub fn open_with_limits(
reader: R,
limits: StreamLimits,
) -> Result<Self, StreamError>
pub fn open_with_limits( reader: R, limits: StreamLimits, ) -> Result<Self, StreamError>
Open with per-query cost StreamLimits. See
StreamIndex2D::open_with_limits.
Sourcepub fn extent(&self) -> Option<Box3D>
pub fn extent(&self) -> Option<Box3D>
Total extent of all indexed items, or None for an empty index.
Read from the cached root box, so this costs no I/O.
Sourcepub fn visit<F: FnMut(usize)>(
&self,
query: Box3D,
visitor: F,
) -> Result<(), StreamError>
pub fn visit<F: FnMut(usize)>( &self, query: Box3D, visitor: F, ) -> Result<(), StreamError>
Stream the indices of every item whose box intersects query, passing
each to visitor. Fallible; see StreamIndex2D::visit.
Sourcepub fn search(&self, query: Box3D) -> Result<Vec<usize>, StreamError>
pub fn search(&self, query: Box3D) -> Result<Vec<usize>, StreamError>
Stream the indices of every item whose box intersects query.
Sourcepub fn search_into(
&self,
query: Box3D,
out: &mut Vec<usize>,
) -> Result<(), StreamError>
pub fn search_into( &self, query: Box3D, out: &mut Vec<usize>, ) -> Result<(), StreamError>
Like search, but appends into a reused buffer.
Sourcepub fn has_payload(&self) -> bool
pub fn has_payload(&self) -> bool
Whether this index was written with a payload section.
Sourcepub fn visit_payloads<F: FnMut(usize, &[u8])>(
&self,
query: Box3D,
visitor: F,
) -> Result<(), StreamError>
pub fn visit_payloads<F: FnMut(usize, &[u8])>( &self, query: Box3D, visitor: F, ) -> Result<(), StreamError>
Visit (item index, payload blob) for every item intersecting query.
See StreamIndex2D::visit_payloads.
Sourcepub fn search_payloads(
&self,
query: Box3D,
) -> Result<Vec<(usize, Vec<u8>)>, StreamError>
pub fn search_payloads( &self, query: Box3D, ) -> Result<Vec<(usize, Vec<u8>)>, StreamError>
Collect (item index, payload blob) for every item intersecting query.
Auto Trait Implementations§
impl<R> Freeze for StreamIndex3D<R>where
R: Freeze,
impl<R> RefUnwindSafe for StreamIndex3D<R>where
R: RefUnwindSafe,
impl<R> Send for StreamIndex3D<R>where
R: Send,
impl<R> Sync for StreamIndex3D<R>where
R: Sync,
impl<R> Unpin for StreamIndex3D<R>where
R: Unpin,
impl<R> UnsafeUnpin for StreamIndex3D<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for StreamIndex3D<R>where
R: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more