Trait StartsWithMultiple

Source
pub trait StartsWithMultiple {
    // Required method
    fn starts_with_multiple<S: AsRef<[u8]>>(&self, bs: &[S]) -> Option<usize>;
}
Expand description

To extend types which implement AsRef<[u8]> to have a starts_with_multiple method.

Required Methods§

Source

fn starts_with_multiple<S: AsRef<[u8]>>(&self, bs: &[S]) -> Option<usize>

Returns Some(usize) if one of the given string slices case-sensitively matches a prefix of this string slice.

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§