pub struct StringGenerator;Expand description
Generates random, unique string values from UUIDs. This implementation does provide an invalid value, the empty string.
Provides implementations of:
Generator- returns randomStringvalues.GeneratorWithInvalid- returns an invalid, as an ID,Stringvalue.GeneratorFromStr- ensures validity of a string representation as anStringID.
Trait Implementations§
Source§impl Clone for StringGenerator
impl Clone for StringGenerator
Source§fn clone(&self) -> StringGenerator
fn clone(&self) -> StringGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StringGenerator
impl Debug for StringGenerator
Source§impl Default for StringGenerator
impl Default for StringGenerator
Source§fn default() -> StringGenerator
fn default() -> StringGenerator
Returns the “default value” for a type. Read more
Source§impl Generator<String> for StringGenerator
impl Generator<String> for StringGenerator
Source§impl GeneratorFromStr<String> for StringGenerator
impl GeneratorFromStr<String> for StringGenerator
Source§fn is_valid_value(s: &str) -> bool
fn is_valid_value(s: &str) -> bool
Is the value
s valid as an ID?Source§impl GeneratorWithInvalid<String> for StringGenerator
impl GeneratorWithInvalid<String> for StringGenerator
Source§fn invalid_id() -> Stringwhere
Self: Sized,
fn invalid_id() -> Stringwhere
Self: Sized,
Return a unique value that is not valid as an ID.
Auto Trait Implementations§
impl Freeze for StringGenerator
impl RefUnwindSafe for StringGenerator
impl Send for StringGenerator
impl Sync for StringGenerator
impl Unpin for StringGenerator
impl UnwindSafe for StringGenerator
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