pub struct LazyIterator { /* private fields */ }Expand description
Lazy iterator for efficient collection processing
Implementations§
Source§impl LazyIterator
impl LazyIterator
Sourcepub fn from_vec(values: Vec<Value>) -> Self
pub fn from_vec(values: Vec<Value>) -> Self
Create a new lazy iterator from a collection
§Examples
use ruchy::runtime::lazy::LazyIterator;
let mut instance = LazyIterator::new();
let result = instance.from_vec();
// Verify behaviorSourcepub fn take(self, count: usize) -> Self
pub fn take(self, count: usize) -> Self
Take first n elements
§Examples
use ruchy::runtime::lazy::take;
let result = take(());
assert_eq!(result, Ok(()));Sourcepub fn skip(self, count: usize) -> Self
pub fn skip(self, count: usize) -> Self
Skip first n elements
§Examples
use ruchy::runtime::lazy::skip;
let result = skip(());
assert_eq!(result, Ok(()));Auto Trait Implementations§
impl !Freeze for LazyIterator
impl !RefUnwindSafe for LazyIterator
impl !Send for LazyIterator
impl !Sync for LazyIterator
impl Unpin for LazyIterator
impl !UnwindSafe for LazyIterator
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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