pub trait SplitOff<R> {
type Remaining;
// Required methods
fn split_off(input: &Self) -> (&R, &Self::Remaining);
fn split_off_mut(input: &mut Self) -> (&mut R, &mut Self::Remaining);
}Expand description
Methods (split_off) for splitting off (partial) references.
Reborrows Self, giving R and whatever is still accessible
after R has been borrowed.
Note that these associated functions are not methods, to avoid
interfering with any methods on Self.
Unlike SplitInto, precisely determines the remaining type, which
may mean it can be inferred.
This trait will be derived. You probably don’t want to implement it.
Required Associated Types§
Required Methods§
fn split_off(input: &Self) -> (&R, &Self::Remaining)
fn split_off_mut(input: &mut Self) -> (&mut R, &mut Self::Remaining)
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.