Trait Concat
trait Concat<Item: ?Sized>
Helper trait for [T]::concat.
Note: the Item type parameter is not used in this trait,
but it allows impls to be more generic.
Without it, we get this error:
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predica
--> library/alloc/src/slice.rs:608:6
|
608 | impl<T: Clone, V: Borrow<[T]>> Concat for [V] {
| ^ unconstrained type parameter
This is because there could exist V types with multiple Borrow<[_]> impls,
such that multiple T types would apply:
#
;
Associated Types
type OutputThe resulting type after concatenation
Required Methods
fn concat(slice: &Self) -> <Self as >::OutputImplementation of
[T]::concat
Implementors
impl<S: Borrow<str>> Concat for [S]impl<T: Clone, V: Borrow<[T]>> Concat for [V]