SplitInto

Trait SplitInto 

Source
pub trait SplitInto<R, S> {
    // Required methods
    fn split_into(input: &Self) -> (&R, &S);
    fn split_into_mut(input: &mut Self) -> (&mut R, &mut S);
}
Expand description

Methods (split_into) for splitting (partial) references.

Reborrows Self, giving R and S, if that is allowed: ie, if R and S borrowings are compatible, and no more permissive than Self.

Note that these associated functions are not methods, to avoid interfering with any methods on Self. There is always an equivalent From (and therefore Into) implementation.

This trait will be derived. You probably don’t want to implement it.

Required Methods§

Source

fn split_into(input: &Self) -> (&R, &S)

Source

fn split_into_mut(input: &mut Self) -> (&mut R, &mut S)

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§