Module str

Source
Expand description

Parallel iterator types for strings

You will rarely need to interact with this module directly unless you need to name one of the iterator types.

Note: ParallelString::par_split() and par_split_terminator() reference a Pattern trait which is not visible outside this crate. This trait is intentionally kept private, for use only by Rayon itself. It is implemented for char, &[char], [char; N], &[char; N], and any function or closure F: Fn(char) -> bool + Sync + Send.

Modulesยง

private ๐Ÿ”’
We hide the Pattern trait in a private module, as its API is not meant for general consumption. If we could have privacy on trait items, then it would be nicer to have its basic existence and implementors public while keeping all of the methods private.

Macrosยง

impl_pattern ๐Ÿ”’

Structsยง

Bytes
Parallel iterator over the bytes of a string
BytesProducer ๐Ÿ”’
CharIndices
Parallel iterator over the characters of a string, with their positions
CharIndicesProducer ๐Ÿ”’
Chars
Parallel iterator over the characters of a string
CharsProducer ๐Ÿ”’
EncodeUtf16
Parallel iterator over a string encoded as UTF-16
EncodeUtf16Producer ๐Ÿ”’
Lines
Parallel iterator over lines in a string
MatchIndices
Parallel iterator over substrings that match a pattern, with their positions
MatchIndicesProducer ๐Ÿ”’
Matches
Parallel iterator over substrings that match a pattern
MatchesProducer ๐Ÿ”’
Split
Parallel iterator over substrings separated by a pattern
SplitAsciiWhitespace
Parallel iterator over substrings separated by ASCII whitespace
SplitInclusive
Parallel iterator over substrings separated by a pattern
SplitTerminator
Parallel iterator over substrings separated by a terminator pattern
SplitTerminatorProducer ๐Ÿ”’
SplitWhitespace
Parallel iterator over substrings separated by whitespace

Traitsยง

ParallelString
Parallel extensions for strings.

Functionsยง

find_char_midpoint ๐Ÿ”’
Find the index of a character boundary near the midpoint.
is_ascii_whitespace ๐Ÿ”’
is_char_boundary ๐Ÿ”’
Test if a byte is the start of a UTF-8 character. (extracted from str::is_char_boundary)
no_carriage_return ๐Ÿ”’
not_empty ๐Ÿ”’
offset ๐Ÿ”’
split ๐Ÿ”’
Try to split a string near the midpoint.