pub struct Source<A: 'static>(_);
Implementations
sourceimpl<A: 'static> Source<A>
impl<A: 'static> Source<A>
pub fn next(&mut self) -> Option<A>
pub fn has_next(&mut self) -> bool
pub fn new<F: FnMut() -> Option<A> + 'static>(function: F) -> Source<A>
pub fn empty() -> Source<A>
pub fn single(a: A) -> Source<A>
pub fn map<B, F: FnMut(A) -> B + 'static>(self, function: F) -> Source<B>
pub fn filter<F: FnMut(&A) -> bool + 'static>(self, function: F) -> Source<A>
pub fn fold<Accumulator, F: FnMut(Accumulator, A) -> Accumulator>(
self,
initial: Accumulator,
function: F
) -> Accumulator
pub fn flat_map<B, Next: FnMut(A) -> Source<B> + 'static>(
self,
next: Next
) -> Source<B>
pub fn concat(self, other: Source<A>) -> Source<A>
pub fn append(self, last: A) -> Source<A>
pub fn prepend(self, head: A) -> Source<A>
pub fn count<F: Fn(A) -> bool>(self, predicate: F) -> i32
Trait Implementations
sourceimpl<A> IntoIterator for Source<A>
impl<A> IntoIterator for Source<A>
type Item = A
type Item = A
The type of the elements being iterated over.
type IntoIter = SourceIterator<A>
type IntoIter = SourceIterator<A>
Which kind of iterator are we turning this into?
sourcefn into_iter(self) -> SourceIterator<A>ⓘNotable traits for SourceIterator<A>impl<A> Iterator for SourceIterator<A> type Item = A;
fn into_iter(self) -> SourceIterator<A>ⓘNotable traits for SourceIterator<A>impl<A> Iterator for SourceIterator<A> type Item = A;
Creates an iterator from a value. Read more
Auto Trait Implementations
impl<A> !RefUnwindSafe for Source<A>
impl<A> !Send for Source<A>
impl<A> !Sync for Source<A>
impl<A> Unpin for Source<A>
impl<A> !UnwindSafe for Source<A>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more