Split

Trait Split 

Source
pub trait Split: Sized + HasSize {
    // Required method
    fn split(self, offset: usize) -> (Self, Self);
}
Expand description

Memory objects that can be split into smaller parts.

Required Methods§

Source

fn split(self, offset: usize) -> (Self, Self)

Splits the memory object into two at the given byte offset from the start.

The resulting memory object cannot be empty. So the offset cannot be neither zero nor the length of the memory object.

§Panics

The function panics if the offset is out of bounds, at either ends, or not base-page-aligned.

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§