pub struct DisplayIntoIter<'a, T, S>where
T: Display + 'a,
S: Clone + IntoIterator<Item = &'a T>,
S::IntoIter: DoubleEndedIterator + ExactSizeIterator,{ /* private fields */ }Expand description
Implement Display for cloneable iter sources that yield &T.
It outputs at most limit elements, excluding those from the 5th to the second-to-last one.
Implementations§
Source§impl<'a, T, S> DisplayIntoIter<'a, T, S>where
T: Display + 'a,
S: Clone + IntoIterator<Item = &'a T>,
S::IntoIter: DoubleEndedIterator + ExactSizeIterator,
impl<'a, T, S> DisplayIntoIter<'a, T, S>where
T: Display + 'a,
S: Clone + IntoIterator<Item = &'a T>,
S::IntoIter: DoubleEndedIterator + ExactSizeIterator,
pub fn new(items: S) -> Self
pub fn at_most(self, limit: Option<usize>) -> Self
pub fn sep(self, separator: &'a str) -> Self
pub fn braces(self, left: &'a str, right: &'a str) -> Self
pub fn ellipsis(self, s: &'a str) -> Self
pub fn elem(self, prefix: &'a str, suffix: &'a str) -> Self
pub fn show_count(self) -> Self
pub fn limit(&self) -> usize
Trait Implementations§
Source§impl<'a, T, S> Display for DisplayIntoIter<'a, T, S>where
T: Display + 'a,
S: Clone + IntoIterator<Item = &'a T>,
S::IntoIter: DoubleEndedIterator + ExactSizeIterator,
impl<'a, T, S> Display for DisplayIntoIter<'a, T, S>where
T: Display + 'a,
S: Clone + IntoIterator<Item = &'a T>,
S::IntoIter: DoubleEndedIterator + ExactSizeIterator,
Auto Trait Implementations§
impl<'a, T, S> Freeze for DisplayIntoIter<'a, T, S>where
S: Freeze,
impl<'a, T, S> RefUnwindSafe for DisplayIntoIter<'a, T, S>where
S: RefUnwindSafe,
impl<'a, T, S> Send for DisplayIntoIter<'a, T, S>where
S: Send,
impl<'a, T, S> Sync for DisplayIntoIter<'a, T, S>where
S: Sync,
impl<'a, T, S> Unpin for DisplayIntoIter<'a, T, S>where
S: Unpin,
impl<'a, T, S> UnsafeUnpin for DisplayIntoIter<'a, T, S>where
S: UnsafeUnpin,
impl<'a, T, S> UnwindSafe for DisplayIntoIter<'a, T, S>where
S: UnwindSafe,
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