Skip to main content

## Join

# Trait Join

Source

    pub trait Join<Separator> {
        type Output;

        // Required method
        fn join(slice: &Self, sep: Separator) -> Self::Output;
    }

🔬This is a nightly-only experimental API. (`slice_concat_trait` #27747)
Expand description

Helper trait for `[T]::join`

## Required Associated Types§

Source

#### type Output

🔬This is a nightly-only experimental API. (`slice_concat_trait` #27747)

The resulting type after concatenation

## Required Methods§

Source

#### fn join(slice: &Self, sep: Separator) -> Self::Output

🔬This is a nightly-only experimental API. (`slice_concat_trait` #27747)

Implementation of `[T]::join`

## Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

## Implementors§

Source§

### impl<S: Borrow<str>> Join<&str> for [S]

Source§

#### type Output = String

Source§

### impl<T: Clone, V: Borrow<[T]>> Join<&T> for [V]

Source§

#### type Output = Vec<T>

Source§

### impl<T: Clone, V: Borrow<[T]>> Join<&[T]> for [V]

Source§

#### type Output = Vec<T>