Trait CloneSlice

Source
pub trait CloneSlice: Slice + Clone {
    // Provided method
    fn clone_slice(&self) -> Self { ... }
}
Expand description

A trait to provide cloning on slices.

This trait provides a self.clone_slice() method that can be used as an alias of (*self).clone() in reduce and apply functions to produce a owned clone of the slice.

Provided Methods§

Source

fn clone_slice(&self) -> Self

Clones current slice.

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<T> CloneSlice for T
where T: Slice + Clone,