Enum FoldWhile

pub enum FoldWhile<T>

An enum used for controlling the execution of fold_while.

See .fold_while() for more information.

Variants

Continue(T)

Continue folding with this value

Done(T)

Fold is complete and will return this value

Implementations

impl<T> FoldWhile<T>

fn into_inner(self) -> T

Return the value in the continue or done.

fn is_done(&self) -> bool

Return true if self is Done, false if it is Continue.

Trait Implementations

impl<T: Clone> Clone for FoldWhile<T>

fn clone(&self) -> FoldWhile<T>

impl<T: Copy> Copy for FoldWhile<T>

impl<T: Debug> Debug for FoldWhile<T>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<T: Eq> Eq for FoldWhile<T>

impl<T: PartialEq> PartialEq for FoldWhile<T>

fn eq(&self, other: &FoldWhile<T>) -> bool

impl<T: PartialEq> StructuralPartialEq for FoldWhile<T>

Auto Trait Implementations

impl<T> Freeze for FoldWhile<T> where T: Freeze + Freeze,

impl<T> RefUnwindSafe for FoldWhile<T> where T: RefUnwindSafe + RefUnwindSafe,

impl<T> Send for FoldWhile<T> where T: Send + Send,

impl<T> Sync for FoldWhile<T> where T: Sync + Sync,

impl<T> Unpin for FoldWhile<T> where T: Unpin + Unpin,

impl<T> UnsafeUnpin for FoldWhile<T> where T: UnsafeUnpin + UnsafeUnpin,

impl<T> UnwindSafe for FoldWhile<T> where T: UnwindSafe + UnwindSafe,

Blanket Implementations

impl<T> Any for FoldWhile<T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for FoldWhile<T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for FoldWhile<T> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for FoldWhile<T> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for FoldWhile<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for FoldWhile<T>

impl<T> ToOwned for FoldWhile<T> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for FoldWhile<T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for FoldWhile<T> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for FoldWhile<T> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>