pub struct FieldGenConf {
pub scope: Option<GenScopeEnum>,
pub gen_type: String,
pub gen_fmt: Option<String>,
}Fields§
§scope: Option<GenScopeEnum>§gen_type: String§gen_fmt: Option<String>Implementations§
Source§impl FieldGenConf
impl FieldGenConf
Sourcepub fn digit_of(beg: i64, end: i64) -> Self
pub fn digit_of(beg: i64, end: i64) -> Self
Create a digit generator with a half-open range [beg, end). Example: FieldGenConf::digit_of(100, 4096)
Sourcepub fn float_of(beg: f64, end: f64) -> Self
pub fn float_of(beg: f64, end: f64) -> Self
Create a float generator with a half-open range [beg, end).
Sourcepub fn chars_from_list(values: Vec<String>) -> Self
pub fn chars_from_list(values: Vec<String>) -> Self
Create a chars generator that randomly picks from a fixed set of values.
Sourcepub fn chars_from(values: &[&str]) -> Self
pub fn chars_from(values: &[&str]) -> Self
Convenience helper for chars_from_list from &str slices.
Sourcepub fn with_fmt(self, fmt: impl Into<String>) -> Self
pub fn with_fmt(self, fmt: impl Into<String>) -> Self
Attach a render format (e.g., “SN-{val}”) to the current generator.
pub fn example_1() -> Self
pub fn example_2() -> Self
pub fn example_3() -> Self
Trait Implementations§
Source§impl Clone for FieldGenConf
impl Clone for FieldGenConf
Source§fn clone(&self) -> FieldGenConf
fn clone(&self) -> FieldGenConf
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 FieldGenConf
impl Debug for FieldGenConf
Source§impl Default for FieldGenConf
impl Default for FieldGenConf
Source§impl<'de> Deserialize<'de> for FieldGenConf
impl<'de> Deserialize<'de> for FieldGenConf
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FieldGenConf
impl Display for FieldGenConf
Source§impl PartialEq for FieldGenConf
impl PartialEq for FieldGenConf
Source§impl Serialize for FieldGenConf
impl Serialize for FieldGenConf
impl StructuralPartialEq for FieldGenConf
Auto Trait Implementations§
impl Freeze for FieldGenConf
impl RefUnwindSafe for FieldGenConf
impl Send for FieldGenConf
impl Sync for FieldGenConf
impl Unpin for FieldGenConf
impl UnsafeUnpin for FieldGenConf
impl UnwindSafe for FieldGenConf
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