pub struct GeneratorBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> GeneratorBuilder<S>
impl<S: State> GeneratorBuilder<S>
Sourcepub fn build(self) -> Generatorwhere
S: IsComplete,
pub fn build(self) -> Generatorwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn root_dir(
self,
value: impl Into<PathBuf>,
) -> GeneratorBuilder<SetRootDir<S>>where
S::RootDir: IsUnset,
pub fn root_dir(
self,
value: impl Into<PathBuf>,
) -> GeneratorBuilder<SetRootDir<S>>where
S::RootDir: IsUnset,
Required.
Sourcepub fn num_files_with_ratio(
self,
value: NumFilesWithRatio,
) -> GeneratorBuilder<SetNumFilesWithRatio<S>>where
S::NumFilesWithRatio: IsUnset,
pub fn num_files_with_ratio(
self,
value: NumFilesWithRatio,
) -> GeneratorBuilder<SetNumFilesWithRatio<S>>where
S::NumFilesWithRatio: IsUnset,
Required.
Sourcepub fn files_exact(self, value: bool) -> GeneratorBuilder<SetFilesExact<S>>where
S::FilesExact: IsUnset,
pub fn files_exact(self, value: bool) -> GeneratorBuilder<SetFilesExact<S>>where
S::FilesExact: IsUnset,
Sourcepub fn maybe_files_exact(
self,
value: Option<bool>,
) -> GeneratorBuilder<SetFilesExact<S>>where
S::FilesExact: IsUnset,
pub fn maybe_files_exact(
self,
value: Option<bool>,
) -> GeneratorBuilder<SetFilesExact<S>>where
S::FilesExact: IsUnset,
Sourcepub fn num_bytes(self, value: u64) -> GeneratorBuilder<SetNumBytes<S>>where
S::NumBytes: IsUnset,
pub fn num_bytes(self, value: u64) -> GeneratorBuilder<SetNumBytes<S>>where
S::NumBytes: IsUnset,
Sourcepub fn maybe_num_bytes(
self,
value: Option<u64>,
) -> GeneratorBuilder<SetNumBytes<S>>where
S::NumBytes: IsUnset,
pub fn maybe_num_bytes(
self,
value: Option<u64>,
) -> GeneratorBuilder<SetNumBytes<S>>where
S::NumBytes: IsUnset,
Sourcepub fn fill_byte(self, value: u8) -> GeneratorBuilder<SetFillByte<S>>where
S::FillByte: IsUnset,
pub fn fill_byte(self, value: u8) -> GeneratorBuilder<SetFillByte<S>>where
S::FillByte: IsUnset,
Sourcepub fn maybe_fill_byte(
self,
value: Option<u8>,
) -> GeneratorBuilder<SetFillByte<S>>where
S::FillByte: IsUnset,
pub fn maybe_fill_byte(
self,
value: Option<u8>,
) -> GeneratorBuilder<SetFillByte<S>>where
S::FillByte: IsUnset,
Sourcepub fn bytes_exact(self, value: bool) -> GeneratorBuilder<SetBytesExact<S>>where
S::BytesExact: IsUnset,
pub fn bytes_exact(self, value: bool) -> GeneratorBuilder<SetBytesExact<S>>where
S::BytesExact: IsUnset,
Sourcepub fn maybe_bytes_exact(
self,
value: Option<bool>,
) -> GeneratorBuilder<SetBytesExact<S>>where
S::BytesExact: IsUnset,
pub fn maybe_bytes_exact(
self,
value: Option<bool>,
) -> GeneratorBuilder<SetBytesExact<S>>where
S::BytesExact: IsUnset,
Sourcepub fn max_depth(self, value: u32) -> GeneratorBuilder<SetMaxDepth<S>>where
S::MaxDepth: IsUnset,
pub fn max_depth(self, value: u32) -> GeneratorBuilder<SetMaxDepth<S>>where
S::MaxDepth: IsUnset,
Sourcepub fn maybe_max_depth(
self,
value: Option<u32>,
) -> GeneratorBuilder<SetMaxDepth<S>>where
S::MaxDepth: IsUnset,
pub fn maybe_max_depth(
self,
value: Option<u32>,
) -> GeneratorBuilder<SetMaxDepth<S>>where
S::MaxDepth: IsUnset,
Sourcepub fn seed(self, value: u64) -> GeneratorBuilder<SetSeed<S>>where
S::Seed: IsUnset,
pub fn seed(self, value: u64) -> GeneratorBuilder<SetSeed<S>>where
S::Seed: IsUnset,
Sourcepub fn maybe_seed(self, value: Option<u64>) -> GeneratorBuilder<SetSeed<S>>where
S::Seed: IsUnset,
pub fn maybe_seed(self, value: Option<u64>) -> GeneratorBuilder<SetSeed<S>>where
S::Seed: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for GeneratorBuilder<S>
impl<S> RefUnwindSafe for GeneratorBuilder<S>
impl<S> Send for GeneratorBuilder<S>
impl<S> Sync for GeneratorBuilder<S>
impl<S> Unpin for GeneratorBuilder<S>
impl<S> UnwindSafe for GeneratorBuilder<S>
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