pub struct DuplicateItem<T, D = T> { /* private fields */ }
Expand description
An item conflicts with existing items.
Implementations§
Source§impl<T, D> DuplicateItem<T, D>
impl<T, D> DuplicateItem<T, D>
Sourcepub fn duplicates(&self) -> &[D]
pub fn duplicates(&self) -> &[D]
Returns the list of items that conflict with the new item.
Sourcepub fn into_parts(self) -> (T, Vec<D>)
pub fn into_parts(self) -> (T, Vec<D>)
Converts self into its constituent parts.
Source§impl<T: Clone> DuplicateItem<T, &T>
impl<T: Clone> DuplicateItem<T, &T>
Sourcepub fn into_owned(self) -> DuplicateItem<T>
pub fn into_owned(self) -> DuplicateItem<T>
Converts self to an owned DuplicateItem
by cloning the list of
duplicates.
If T
is 'static
, the owned form is suitable for conversion to
Box<dyn std::error::Error>
, anyhow::Error
, and so on.
Trait Implementations§
Source§impl<T: Debug, D: Debug> Error for DuplicateItem<T, D>
impl<T: Debug, D: Debug> Error for DuplicateItem<T, D>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<T, D> Freeze for DuplicateItem<T, D>where
T: Freeze,
impl<T, D> RefUnwindSafe for DuplicateItem<T, D>where
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<T, D> Send for DuplicateItem<T, D>
impl<T, D> Sync for DuplicateItem<T, D>
impl<T, D> Unpin for DuplicateItem<T, D>
impl<T, D> UnwindSafe for DuplicateItem<T, D>where
T: UnwindSafe,
D: 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