pub trait SplitAtWhile {
type Item;
// Required method
fn split_at_while<F>(&self, f: F) -> (&Self, &Self)
where F: FnMut(&Self::Item) -> bool;
}
Required Associated Types§
Required Methods§
Sourcefn split_at_while<F>(&self, f: F) -> (&Self, &Self)
fn split_at_while<F>(&self, f: F) -> (&Self, &Self)
Splits a slice at the first point after which f
returns false.
Usually used to segment input according to character categories.
e.g. 1. part while f(x) == true
, then 2. part
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.