pub struct ConstrainedSamplerBuilder { /* private fields */ }Expand description
Ergonomic builder for ConstrainedSampler.
Implementations§
Source§impl ConstrainedSamplerBuilder
impl ConstrainedSamplerBuilder
Sourcepub fn with_json_constraint(self) -> ConstrainedSampler
pub fn with_json_constraint(self) -> ConstrainedSampler
Build a ConstrainedSampler with a JsonConstraint.
Sourcepub fn with_regex_constraint(
self,
pattern: &str,
) -> Result<ConstrainedSampler, ConstraintError>
pub fn with_regex_constraint( self, pattern: &str, ) -> Result<ConstrainedSampler, ConstraintError>
Build a ConstrainedSampler with a RegexConstraint.
Sourcepub fn unconstrained(self) -> ConstrainedSampler
pub fn unconstrained(self) -> ConstrainedSampler
Build an unconstrained ConstrainedSampler (passthrough).
Auto Trait Implementations§
impl Freeze for ConstrainedSamplerBuilder
impl RefUnwindSafe for ConstrainedSamplerBuilder
impl Send for ConstrainedSamplerBuilder
impl Sync for ConstrainedSamplerBuilder
impl Unpin for ConstrainedSamplerBuilder
impl UnsafeUnpin for ConstrainedSamplerBuilder
impl UnwindSafe for ConstrainedSamplerBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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