pub struct ConstraintBuilder { /* private fields */ }Expand description
Builder for Constraint.
Implementations§
Source§impl ConstraintBuilder
impl ConstraintBuilder
Sourcepub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn description<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A textual summary of the constraint to be applied.
pub fn tests<VALUE: Into<Vec<ConstraintTest>>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn build(&self) -> Result<Constraint, ConstraintBuilderError>
pub fn build(&self) -> Result<Constraint, ConstraintBuilderError>
Trait Implementations§
Source§impl Clone for ConstraintBuilder
impl Clone for ConstraintBuilder
Source§fn clone(&self) -> ConstraintBuilder
fn clone(&self) -> ConstraintBuilder
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 moreAuto Trait Implementations§
impl Freeze for ConstraintBuilder
impl RefUnwindSafe for ConstraintBuilder
impl Send for ConstraintBuilder
impl Sync for ConstraintBuilder
impl Unpin for ConstraintBuilder
impl UnwindSafe for ConstraintBuilder
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