pub struct CharactersGenerator { /* private fields */ }Expand description
Generator for single Unicode characters (char). Created by characters().
Implementations§
Source§impl CharactersGenerator
impl CharactersGenerator
Sourcepub fn codec(self, codec: &str) -> Self
pub fn codec(self, codec: &str) -> Self
Restrict to characters encodable in this codec (e.g. "ascii", "utf-8", "latin-1").
Sourcepub fn min_codepoint(self, min_codepoint: u32) -> Self
pub fn min_codepoint(self, min_codepoint: u32) -> Self
Set the minimum Unicode codepoint.
Sourcepub fn max_codepoint(self, max_codepoint: u32) -> Self
pub fn max_codepoint(self, max_codepoint: u32) -> Self
Set the maximum Unicode codepoint.
Sourcepub fn categories(self, categories: &[&str]) -> Self
pub fn categories(self, categories: &[&str]) -> Self
Include only characters from these Unicode general categories (e.g. ["L", "Nd"]).
Mutually exclusive with exclude_categories.
Sourcepub fn exclude_categories(self, exclude_categories: &[&str]) -> Self
pub fn exclude_categories(self, exclude_categories: &[&str]) -> Self
Exclude characters from these Unicode general categories.
Mutually exclusive with categories.
Sourcepub fn include_characters(self, include_characters: &str) -> Self
pub fn include_characters(self, include_characters: &str) -> Self
Always include these specific characters, even if excluded by other filters.
Sourcepub fn exclude_characters(self, exclude_characters: &str) -> Self
pub fn exclude_characters(self, exclude_characters: &str) -> Self
Always exclude these specific characters.
Trait Implementations§
Source§impl Generator<char> for CharactersGenerator
impl Generator<char> for CharactersGenerator
Source§fn map<U, F>(self, f: F) -> Mapped<T, U, F, Self>
fn map<U, F>(self, f: F) -> Mapped<T, U, F, Self>
Transform generated values using a function. Read more
Source§fn flat_map<U, G, F>(self, f: F) -> FlatMapped<T, U, G, F, Self>
fn flat_map<U, G, F>(self, f: F) -> FlatMapped<T, U, G, F, Self>
Generate a value, then use it to choose or configure another generator. Read more
Auto Trait Implementations§
impl Freeze for CharactersGenerator
impl RefUnwindSafe for CharactersGenerator
impl Send for CharactersGenerator
impl Sync for CharactersGenerator
impl Unpin for CharactersGenerator
impl UnsafeUnpin for CharactersGenerator
impl UnwindSafe for CharactersGenerator
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