// Copyright 2023 Colin Finck <colin@reactos.org>
// SPDX-License-Identifier: MIT OR Apache-2.0
////! Additional traits provided by this crate.
/// Fallible variant of the [`Extend`] trait
pubtraitTryExtend<T> {/// The type returned in the event of an error.
typeError;/// Tries to extends a collection with the contents of an iterator.
fntry_extend<I:IntoIterator<Item = T>>(&mutself, iter: I)->Result<(), Self::Error>;/// Tries to extend a collection with exactly one element.
fntry_extend_one(&mutself, item: T)->Result<(), Self::Error>{self.try_extend(Some(item))}}