Trait Split

Source
pub trait Split<T> {
    // Required methods
    fn split(&self) -> [T; 2];
    fn concat(lhs: &T, rhs: &T) -> Self;
    fn upper(&self) -> T;
    fn lower(&self) -> T;
    fn set_upper(&mut self, val: &T) -> &mut Self;
    fn set_lower(&mut self, val: &T) -> &mut Self;
}
Expand description

Split an object onto two part that can be concatenated or accessed separately

It aims to be the upper and lower parts of a vector or the upper diagonal and lower diagonal parts of a matrix.

Required Methods§

Source

fn split(&self) -> [T; 2]

Get the two parts of the split object

Source

fn concat(lhs: &T, rhs: &T) -> Self

Concatenates two part to construct an object

Source

fn upper(&self) -> T

Get the first part of the object

Source

fn lower(&self) -> T

Get the second part of the object

Source

fn set_upper(&mut self, val: &T) -> &mut Self

Set the first part of the object

Source

fn set_lower(&mut self, val: &T) -> &mut Self

Set the second part of the object

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§