pub struct Set<T>(/* private fields */);Expand description
An ordered, deduplicated collection of items.
Implementations§
Source§impl<T: Ord> Set<T>
impl<T: Ord> Set<T>
Sourcepub fn from_iter_dedup<I: IntoIterator<Item = T>>(iter: I) -> Self
pub fn from_iter_dedup<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a new Set from an iterator, removing duplicates.
Unlike FromIterator and From, this method tolerates duplicate
items by silently discarding them.
Trait Implementations§
Source§impl<T: EncodeSize> EncodeSize for Set<T>
impl<T: EncodeSize> EncodeSize for Set<T>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl<'a, T> IntoIterator for &'a Set<T>
impl<'a, T> IntoIterator for &'a Set<T>
Source§impl<T> IntoIterator for Set<T>
impl<T> IntoIterator for Set<T>
Source§impl<T: Ord> Ord for Set<T>
impl<T: Ord> Ord for Set<T>
Source§impl<T: PartialOrd> PartialOrd for Set<T>
impl<T: PartialOrd> PartialOrd for Set<T>
Source§impl<T: Ord> Quorum for Set<T>
impl<T: Ord> Quorum for Set<T>
Source§impl<T: Read + Ord> Read for Set<T>
impl<T: Read + Ord> Read for Set<T>
Source§impl<T: Ord> TryFromIterator<T> for Set<T>
impl<T: Ord> TryFromIterator<T> for Set<T>
impl<T: Eq> Eq for Set<T>
impl<T> StructuralPartialEq for Set<T>
Auto Trait Implementations§
impl<T> Freeze for Set<T>
impl<T> RefUnwindSafe for Set<T>where
T: RefUnwindSafe,
impl<T> Send for Set<T>where
T: Send,
impl<T> Sync for Set<T>where
T: Sync,
impl<T> Unpin for Set<T>where
T: Unpin,
impl<T> UnwindSafe for Set<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<X, U> DecodeRangeExt<X> for U
impl<X, U> DecodeRangeExt<X> for U
Source§fn decode_range(
buf: impl Buf,
range: impl RangeBounds<usize>,
) -> Result<Self, Error>
fn decode_range( buf: impl Buf, range: impl RangeBounds<usize>, ) -> Result<Self, Error>
Decodes a value using only a range configuration. Read more
Source§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<X, U> ReadRangeExt<X> for U
impl<X, U> ReadRangeExt<X> for U
Source§fn read_range(
buf: &mut impl Buf,
range: impl RangeBounds<usize>,
) -> Result<Self, Error>
fn read_range( buf: &mut impl Buf, range: impl RangeBounds<usize>, ) -> Result<Self, Error>
Reads a value using only a range configuration. Read more