Skip to main content

StreamIndex3D

Struct StreamIndex3D 

Source
pub struct StreamIndex3D<R> { /* private fields */ }
Available on crate feature 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.

Source

pub async fn open_async(reader: R) -> Result<Self, StreamError>

Available on crate feature async only.

Open and validate a 3D f64 index from an async reader.

Source

pub async fn open_with_limits_async( reader: R, limits: StreamLimits, ) -> Result<Self, StreamError>

Available on crate feature async only.

Open from an async reader with per-query StreamLimits.

Source

pub async fn search_async( &self, query: Box3D, ) -> Result<Vec<usize>, StreamError>

Available on crate feature async only.

Stream the indices of every item whose box intersects query.

Source

pub async fn search_payloads_async( &self, query: Box3D, ) -> Result<Vec<(usize, Vec<u8>)>, StreamError>

Available on crate feature async only.

Stream (item index, payload blob) for every item intersecting query.

Source

pub fn has_payload_async(&self) -> bool

Available on crate feature async only.

Whether this index was written with a payload section.

Source§

impl<R> StreamIndex3D<R>

Source

pub fn into_directory(self) -> (StreamDirectory, R)

Split off the reader, keeping the reusable StreamDirectory. No I/O.

Source

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.

Source

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>

Source

pub fn open(reader: R) -> Result<Self, StreamError>

Open and validate a 3D f64 index from reader.

Source

pub fn open_with_limits( reader: R, limits: StreamLimits, ) -> Result<Self, StreamError>

Open with per-query cost StreamLimits. See StreamIndex2D::open_with_limits.

Source

pub fn num_items(&self) -> usize

Number of indexed items.

Source

pub fn is_empty(&self) -> bool

Whether the index has no items.

Source

pub fn node_size(&self) -> usize

Packed node size of the index.

Source

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.

Source

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.

Source

pub fn search(&self, query: Box3D) -> Result<Vec<usize>, StreamError>

Stream the indices of every item whose box intersects query.

Source

pub fn search_into( &self, query: Box3D, out: &mut Vec<usize>, ) -> Result<(), StreamError>

Like search, but appends into a reused buffer.

Source

pub fn has_payload(&self) -> bool

Whether this index was written with a payload section.

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.