pub struct AsciiChars<F>(/* private fields */)
where
F: Fn(u8) -> bool;
Expand description
Searches a string for a set of ASCII characters. Up to 16 characters may be used.
Implementations§
Source§impl<F> AsciiChars<F>
impl<F> AsciiChars<F>
Sourcepub fn new(chars: [u8; 16], len: i32, fallback: F) -> Self
pub fn new(chars: [u8; 16], len: i32, fallback: F) -> Self
Manual constructor; prefer using ascii_chars!
instead.
Provide an array of ASCII bytes to search for, the number of valid bytes provided, and a closure to use when the SIMD intrinsics are not available. The closure must search for the same characters as in the array.
§Panics
- If you provide a non-ASCII byte.
Auto Trait Implementations§
impl<F> Freeze for AsciiChars<F>where
F: Freeze,
impl<F> RefUnwindSafe for AsciiChars<F>where
F: RefUnwindSafe,
impl<F> Send for AsciiChars<F>where
F: Send,
impl<F> Sync for AsciiChars<F>where
F: Sync,
impl<F> Unpin for AsciiChars<F>where
F: Unpin,
impl<F> UnwindSafe for AsciiChars<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more