pub struct TemplateConfig {
pub use_weights: bool,
pub unique_outputs: bool,
pub max_unique_attempts: usize,
}Expand description
Configuration for template generation.
Fields§
§use_weights: boolWhether to use weighted template selection.
unique_outputs: boolWhether to ensure unique outputs.
max_unique_attempts: usizeMaximum attempts to generate unique output.
Implementations§
Source§impl TemplateConfig
impl TemplateConfig
Sourcepub fn with_use_weights(self, use_weights: bool) -> Self
pub fn with_use_weights(self, use_weights: bool) -> Self
Set whether to use weighted selection.
Sourcepub fn with_unique_outputs(self, unique: bool) -> Self
pub fn with_unique_outputs(self, unique: bool) -> Self
Set whether to ensure unique outputs.
Sourcepub fn with_max_unique_attempts(self, attempts: usize) -> Self
pub fn with_max_unique_attempts(self, attempts: usize) -> Self
Set max attempts for unique generation.
Trait Implementations§
Source§impl Clone for TemplateConfig
impl Clone for TemplateConfig
Source§fn clone(&self) -> TemplateConfig
fn clone(&self) -> TemplateConfig
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 TemplateConfig
impl Debug for TemplateConfig
Source§impl Default for TemplateConfig
impl Default for TemplateConfig
Source§impl PartialEq for TemplateConfig
impl PartialEq for TemplateConfig
impl StructuralPartialEq for TemplateConfig
Auto Trait Implementations§
impl Freeze for TemplateConfig
impl RefUnwindSafe for TemplateConfig
impl Send for TemplateConfig
impl Sync for TemplateConfig
impl Unpin for TemplateConfig
impl UnwindSafe for TemplateConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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