pub struct Source<A: 'static>(/* private fields */);Implementations§
Source§impl<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§
Auto Trait Implementations§
impl<A> Freeze for Source<A>
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§
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