Struct runestick::Iterator [−][src]
An owning iterator.
Implementations
impl Iterator
[src]
pub fn from<T>(name: &'static str, iter: T) -> Self where
T: IteratorTrait,
[src]
T: IteratorTrait,
Construct a new owning iterator.
The name is only intended to identify the iterator in case of errors.
pub fn from_double_ended<T>(name: &'static str, iter: T) -> Self where
T: DoubleEndedIteratorTrait,
[src]
T: DoubleEndedIteratorTrait,
Construct a new double-ended owning iterator, with a human-readable name.
The name is only intended to identify the iterator in case of errors.
pub fn empty() -> Self
[src]
Creates an iterator that yields nothing.
pub fn once(value: Value) -> Self
[src]
Creates an iterator that yields an element exactly once.
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
Get the size hint for the iterator.
pub fn next(&mut self) -> Result<Option<Value>, VmError>
[src]
Get the next value out of the iterator.
pub fn next_back(&mut self) -> Result<Option<Value>, VmError>
[src]
Get the next back value out of the iterator.
pub fn enumerate(self) -> Self
[src]
Enumerate the iterator.
pub fn map(self, map: Function) -> Self
[src]
Map the iterator using the given function.
pub fn flat_map(self, map: Function) -> Self
[src]
Map and flatten the iterator using the given function.
pub fn filter(self, filter: Function) -> Self
[src]
Filter the iterator using the given function.
pub fn find(self, find: Function) -> Result<Option<Value>, VmError>
[src]
Find the first matching value in the iterator using the given function.
pub fn all(self, find: Function) -> Result<bool, VmError>
[src]
Test if all entries in the iterator matches the given predicate.
pub fn any(self, find: Function) -> Result<bool, VmError>
[src]
Test if any entry in the iterator matches the given predicate.
pub fn chain(self, other: Value) -> Result<Self, VmError>
[src]
Chain this iterator with another.
pub fn chain_raw(self, other: Self) -> Result<Self, VmError>
[src]
Chain this iterator with another.
pub fn rev(self) -> Result<Self, VmError>
[src]
Map the iterator using the given function.
pub fn skip(self, n: usize) -> Self
[src]
Skip over the given number of elements from the iterator.
pub fn take(self, n: usize) -> Self
[src]
Take the given number of elements from the iterator.
pub fn count(&mut self) -> Result<usize, VmError>
[src]
Count the number of elements remaining in the iterator.
pub fn peekable(self) -> Self
[src]
Create a peekable iterator.
pub fn peek(&mut self) -> Result<Option<Value>, VmError>
[src]
Peek the next element if supported.
pub fn collect<T>(self) -> Result<Vec<T>, VmError> where
T: FromValue,
[src]
T: FromValue,
Collect results from the iterator.
pub fn fold(self, accumulator: Value, f: Function) -> Result<Value, VmError>
[src]
Integrate over the iterator, using accumulator as the initial value and then forwarding the result of each stage.
pub fn product(self) -> Result<Value, VmError>
[src]
Compute the product under the assumption of a homogeonous iterator of type T.
pub fn sum(self) -> Result<Value, VmError>
[src]
Compute the sum under the assumption of a homogeonous iterator of type T.
Trait Implementations
impl Debug for Iterator
[src]
impl From<Iterator> for Value
[src]
impl FromValue for Iterator
[src]
fn from_value(value: Value) -> Result<Self, VmError>
[src]
impl InstallWith for Iterator
[src]
fn install_with(_: &mut Module) -> Result<(), ContextError>
[src]
impl Named for Iterator
[src]
impl ToValue for Iterator
[src]
impl TypeOf for Iterator
[src]
impl<'a> UnsafeFromValue for &'a Iterator
[src]
type Output = *const Iterator
The output type from the unsafe coercion.
type Guard = RawRef
The raw guard returned. Read more
fn from_value(value: Value) -> Result<(Self::Output, Self::Guard), VmError>
[src]
unsafe fn unsafe_coerce(output: Self::Output) -> Self
[src]
impl<'a> UnsafeFromValue for &'a mut Iterator
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Iterator
impl !Send for Iterator
impl !Sync for Iterator
impl Unpin for Iterator
impl !UnwindSafe for Iterator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,