zerocopy::byte_slice

Trait CloneableByteSlice

Source
pub unsafe trait CloneableByteSlice: ByteSlice + Clone { }
Expand description

A ByteSlice which can be cloned without violating dereference stability.

§Safety

If B: CloneableByteSlice, then the dereference stability properties required by ByteSlice (see that trait’s safety documentation) do not only hold regarding two calls to b.deref() or b.deref_mut(), but also hold regarding c.deref() or c.deref_mut(), where c is produced by b.clone(), b.clone().clone(), etc.

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.

Implementations on Foreign Types§

Source§

impl<'a> CloneableByteSlice for &'a [u8]

Implementors§