mod concat_mut;
mod into_concat;
pub use concat_mut::*;
pub use into_concat::*;
#[allow(private_bounds)]
pub trait Concat: Sized + ConcatSealed {
#[inline]
fn into_concat(self) -> IntoConcat<Self> {
IntoConcat::new(self)
}
#[inline]
fn concat_mut(&mut self) -> ConcatMut<'_, Self> {
ConcatMut::new(self)
}
}
#[allow(private_bounds)]
pub trait ConcatItem<OwnedSlice>: Sized + ConcatItemSealed<OwnedSlice> {}
pub(crate) trait ConcatSealed {}
pub(crate) trait ConcatItemSealed<OwnedSlice>: Sized {
fn push_to(&mut self, owned_slice: &mut OwnedSlice);
#[inline]
fn push_into(mut self, owned_slice: &mut OwnedSlice) {
self.push_to(owned_slice);
}
fn bulk_push_into(items: impl IntoIterator<Item = Self>, owned_slice: &mut OwnedSlice) {
items
.into_iter()
.for_each(move |item| item.push_into(owned_slice));
}
}