pub struct LocalConfig {
pub rng: Option<StdRng>,
pub entity_name: Option<String>,
pub field_name: Option<String>,
pub indices: Vec<usize>,
pub count_items: u64,
}Fields§
§rng: Option<StdRng>Random number generator for deterministic or random generation.
Uses StdRng to provide high-quality random numbers. Can be seeded for
deterministic generation (useful for testing) or use a random seed for
truly random output.
entity_name: Option<String>§field_name: Option<String>§indices: Vec<usize>§count_items: u64Implementations§
Source§impl LocalConfig
impl LocalConfig
pub fn new(rng: Option<StdRng>) -> Self
pub fn from_current( rng: Option<StdRng>, count_items: u64, entity_name: Option<&str>, field_name: Option<&str>, index: Option<usize>, parents: Option<&[usize]>, ) -> Self
pub fn from_current_with_config( rng: Option<StdRng>, count_items: Option<u64>, parent_config: Option<&mut LocalConfig>, ) -> Self
pub fn get_index(&self, depth: usize) -> Option<usize>
pub fn set_index(&mut self, index: usize)
pub fn process_key(&self, replacer: &Replacer) -> Option<Value>
Auto Trait Implementations§
impl Freeze for LocalConfig
impl RefUnwindSafe for LocalConfig
impl Send for LocalConfig
impl Sync for LocalConfig
impl Unpin for LocalConfig
impl UnsafeUnpin for LocalConfig
impl UnwindSafe for LocalConfig
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more