Trait zerotrie::helpers::MaybeSplitAt
source · pub(crate) trait MaybeSplitAt<T> {
// Required methods
fn maybe_split_at(&self, mid: usize) -> Option<(&Self, &Self)>;
fn debug_split_at(&self, mid: usize) -> (&Self, &Self);
}
Required Methods§
sourcefn maybe_split_at(&self, mid: usize) -> Option<(&Self, &Self)>
fn maybe_split_at(&self, mid: usize) -> Option<(&Self, &Self)>
Like slice::split_at but returns an Option instead of panicking if the index is out of range.
sourcefn debug_split_at(&self, mid: usize) -> (&Self, &Self)
fn debug_split_at(&self, mid: usize) -> (&Self, &Self)
Like slice::split_at but debug-panics and returns an empty second slice if the index is out of range.
Object Safety§
This trait is not object safe.