pub struct IterDebug<T>(/* private fields */);Expand description
The whole point, see the crate docs.
Note that an iterator can only be debugged once, aim to wrap your iterator as late as possible, usually directly in the print / format statement.
Implementations§
Source§impl<T> IterDebug<T>
impl<T> IterDebug<T>
Sourcepub fn new(item: T) -> Self
pub fn new(item: T) -> Self
Construct a new instance directly, instead of using the
debug method. Prints output as a list.
Sourcepub fn new_set(item: T) -> Self
pub fn new_set(item: T) -> Self
Construct a new instance directly, instead of using the
debug method. Prints output as a set.
Sourcepub fn try_into_inner(&self) -> Option<T>
pub fn try_into_inner(&self) -> Option<T>
Attempt to extract the inner iterator, returning None
if it has already been removed or debug printed.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for IterDebug<T>
impl<T> !RefUnwindSafe for IterDebug<T>
impl<T> !Sync for IterDebug<T>
impl<T> Send for IterDebug<T>
impl<T> Unpin for IterDebug<T>
impl<T> UnsafeUnpin for IterDebug<T>
impl<T> UnwindSafe for IterDebug<T>
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