pub trait EdgeCursor: Send + Debug {
// Required method
fn next_batch(
&mut self,
batch_size: usize,
) -> Result<Vec<Edge>, StorageError>;
// Provided methods
fn next_column_batch(
&mut self,
prop_names: &[Arc<str>],
batch_size: usize,
) -> Result<EdgeColumnBatch, StorageError> { ... }
fn malformed_skipped(&self) -> u64 { ... }
}Expand description
A cursor that yields edges in batches.
Required Methods§
Sourcefn next_batch(&mut self, batch_size: usize) -> Result<Vec<Edge>, StorageError>
fn next_batch(&mut self, batch_size: usize) -> Result<Vec<Edge>, StorageError>
Read the next batch of edges (at most batch_size rows).
Returns an empty Vec when the scan is exhausted.
Provided Methods§
Sourcefn next_column_batch(
&mut self,
prop_names: &[Arc<str>],
batch_size: usize,
) -> Result<EdgeColumnBatch, StorageError>
fn next_column_batch( &mut self, prop_names: &[Arc<str>], batch_size: usize, ) -> Result<EdgeColumnBatch, StorageError>
Read the next batch as column-major data (at most batch_size rows).
prop_names lists the properties to decode; an empty list means decode
every property of the edge. The returned batch carries one
PropertyColumn per requested property.
The default implementation falls back to Self::next_batch and
transposes the rows into columns. Storage engines override this when
they can decode straight from the column store.
Returns an empty batch when the scan is exhausted.
Sourcefn malformed_skipped(&self) -> u64
fn malformed_skipped(&self) -> u64
Number of malformed/unparseable entries skipped so far.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".