Trait Concat

Source
pub trait Concat: Sized {
    // Required methods
    fn empty() -> Self;
    fn concat(self, other: Self) -> Self;

    // Provided method
    fn empty_at(location: Span) -> Self { ... }
}
Expand description

Containers that can be concatenated with each other

Required Methods§

Source

fn empty() -> Self

Create an empty container

Source

fn concat(self, other: Self) -> Self

Concatenate the contents of two containers together

Provided Methods§

Source

fn empty_at(location: Span) -> Self

Create an empty container at a specific location in the source

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Concat for Span

Source§

impl<T> Concat for List<T>