pub struct DisplayBTreeSet<'a, T: Display> { /* private fields */ }Expand description
Implement Display for BTreeSet<T> if T is Display.
It outputs at most limit elements, excluding those from the 5th to the second-to-last one:
DisplayBTreeSet{ set: ... }outputs:"[1,2,3,4,..,6]".
Implementations§
Source§impl<'a, T: Display> DisplayBTreeSet<'a, T>
impl<'a, T: Display> DisplayBTreeSet<'a, T>
pub fn new(set: &'a BTreeSet<T>) -> 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§
Auto Trait Implementations§
impl<'a, T> Freeze for DisplayBTreeSet<'a, T>
impl<'a, T> RefUnwindSafe for DisplayBTreeSet<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for DisplayBTreeSet<'a, T>where
T: Sync,
impl<'a, T> Sync for DisplayBTreeSet<'a, T>where
T: Sync,
impl<'a, T> Unpin for DisplayBTreeSet<'a, T>
impl<'a, T> UnsafeUnpin for DisplayBTreeSet<'a, T>
impl<'a, T> UnwindSafe for DisplayBTreeSet<'a, T>where
T: RefUnwindSafe,
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