Skip to main content

DiscreteContents

Trait DiscreteContents 

Source
pub trait DiscreteContents: Sized {
    // Required methods
    fn split(self, at: usize) -> DiscreteContentResult<Self>;
    fn merge(self, value: Self) -> DiscreteContentResult<Self>;
}
Expand description

Node contents which can be split apart or merged together.

Required Methods§

Source

fn split(self, at: usize) -> DiscreteContentResult<Self>

Splits the item at specified index.

If splitting the item fails, the original contents are returned.

Source

fn merge(self, value: Self) -> DiscreteContentResult<Self>

Merges two items together.

If merging the two items fails, the original contents are returned in the order they were specified in.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§