pub struct LazyVecFrom1<I, T, S1I, S1T>where
S1T: Clone,{ /* private fields */ }Expand description
Lazily computed vector deriving values on-the-fly from one source vector.
Unlike EagerVec, no data is stored on disk. Values are computed during
iteration by applying a function to the source vector’s elements. Use when:
- Storage space is limited
- Computation is cheap relative to disk I/O
- Values are only accessed once or infrequently
For frequently accessed derived data, prefer EagerVec for better performance.
Implementations§
Source§impl<I, T, S1I, S1T> LazyVecFrom1<I, T, S1I, S1T>
impl<I, T, S1I, S1T> LazyVecFrom1<I, T, S1I, S1T>
pub fn init( name: &str, version: Version, source: IterableBoxedVec<S1I, S1T>, compute: ComputeFrom1<I, T, S1I, S1T>, ) -> Self
Source§impl<I, T, S1T> LazyVecFrom1<I, T, I, S1T>
impl<I, T, S1T> LazyVecFrom1<I, T, I, S1T>
Sourcepub fn transformed<F: UnaryTransform<S1T, T>>(
name: &str,
version: Version,
source: IterableBoxedVec<I, S1T>,
) -> Self
pub fn transformed<F: UnaryTransform<S1T, T>>( name: &str, version: Version, source: IterableBoxedVec<I, S1T>, ) -> Self
Create a lazy vec with a generic transform.
Usage: LazyVecFrom1::transformed::<Negate>(name, v, source)
Trait Implementations§
Source§impl<I, T, S1I, S1T> AnyVec for LazyVecFrom1<I, T, S1I, S1T>
impl<I, T, S1I, S1T> AnyVec for LazyVecFrom1<I, T, S1I, S1T>
fn version(&self) -> Version
fn name(&self) -> &str
Source§fn index_type_to_string(&self) -> &'static str
fn index_type_to_string(&self) -> &'static str
Returns the string representation of the index type.
fn len(&self) -> usize
Source§fn value_type_to_size_of(&self) -> usize
fn value_type_to_size_of(&self) -> usize
Returns the size in bytes of the value type.
Source§fn value_type_to_string(&self) -> &'static str
fn value_type_to_string(&self) -> &'static str
Returns the short type name of the value type (e.g., “Sats”, “StoredF64”).
Source§fn region_names(&self) -> Vec<String>
fn region_names(&self) -> Vec<String>
Returns the list of region names used by this vector.
fn is_empty(&self) -> bool
Source§fn region_name(&self) -> String
fn region_name(&self) -> String
Returns the combined name of the vector.
Source§fn etag(&self, stamp: Stamp, to: Option<i64>) -> String
fn etag(&self, stamp: Stamp, to: Option<i64>) -> String
Generates an ETag for this vector based on stamp and optional end index.
Source§fn i64_to_usize(&self, i: i64) -> usize
fn i64_to_usize(&self, i: i64) -> usize
Converts an i64 index to usize, supporting negative indexing (Python-style).
Source§impl<I: Clone, T: Clone, S1I: Clone, S1T> Clone for LazyVecFrom1<I, T, S1I, S1T>
impl<I: Clone, T: Clone, S1I: Clone, S1T> Clone for LazyVecFrom1<I, T, S1I, S1T>
Source§fn clone(&self) -> LazyVecFrom1<I, T, S1I, S1T>
fn clone(&self) -> LazyVecFrom1<I, T, S1I, S1T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, I, T, S1I, S1T> IntoIterator for &'a LazyVecFrom1<I, T, S1I, S1T>
impl<'a, I, T, S1I, S1T> IntoIterator for &'a LazyVecFrom1<I, T, S1I, S1T>
Source§impl<I, T, S1I, S1T> IterableVec<I, T> for LazyVecFrom1<I, T, S1I, S1T>
impl<I, T, S1I, S1T> IterableVec<I, T> for LazyVecFrom1<I, T, S1I, S1T>
fn iter(&self) -> BoxedVecIterator<'_, I, T>
Auto Trait Implementations§
impl<I, T, S1I, S1T> Freeze for LazyVecFrom1<I, T, S1I, S1T>
impl<I, T, S1I, S1T> !RefUnwindSafe for LazyVecFrom1<I, T, S1I, S1T>
impl<I, T, S1I, S1T> Send for LazyVecFrom1<I, T, S1I, S1T>
impl<I, T, S1I, S1T> Sync for LazyVecFrom1<I, T, S1I, S1T>
impl<I, T, S1I, S1T> Unpin for LazyVecFrom1<I, T, S1I, S1T>
impl<I, T, S1I, S1T> !UnwindSafe for LazyVecFrom1<I, T, S1I, S1T>
Blanket Implementations§
Source§impl<V> AnyCollectableVec for V
impl<V> AnyCollectableVec for V
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, T, V> CollectableVec<I, T> for V
impl<I, T, V> CollectableVec<I, T> for V
Source§fn iter_range(
&self,
from: Option<usize>,
to: Option<usize>,
) -> impl Iterator<Item = T>
fn iter_range( &self, from: Option<usize>, to: Option<usize>, ) -> impl Iterator<Item = T>
Returns an iterator over the specified range.
Source§fn iter_signed_range(
&self,
from: Option<i64>,
to: Option<i64>,
) -> impl Iterator<Item = T>
fn iter_signed_range( &self, from: Option<i64>, to: Option<i64>, ) -> impl Iterator<Item = T>
Returns an iterator over the specified range using signed indices (supports negative indexing).
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>
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 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>
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