pub struct UniquenessOptions {
pub null_handling: NullHandling,
pub case_sensitive: bool,
pub trim_whitespace: bool,
}Expand description
Options for configuring uniqueness constraint behavior.
Fields§
§null_handling: NullHandlingHow to handle NULL values in uniqueness calculations.
case_sensitive: boolWhether string comparisons should be case-sensitive.
trim_whitespace: boolWhether to trim whitespace before comparison.
Implementations§
Source§impl UniquenessOptions
impl UniquenessOptions
Sourcepub fn with_null_handling(self, null_handling: NullHandling) -> Self
pub fn with_null_handling(self, null_handling: NullHandling) -> Self
Sets the null handling strategy.
Sourcepub fn case_sensitive(self, case_sensitive: bool) -> Self
pub fn case_sensitive(self, case_sensitive: bool) -> Self
Sets whether string comparisons should be case-sensitive.
Sourcepub fn trim_whitespace(self, trim_whitespace: bool) -> Self
pub fn trim_whitespace(self, trim_whitespace: bool) -> Self
Sets whether to trim whitespace before comparison.
Trait Implementations§
Source§impl Clone for UniquenessOptions
impl Clone for UniquenessOptions
Source§fn clone(&self) -> UniquenessOptions
fn clone(&self) -> UniquenessOptions
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 UniquenessOptions
impl Debug for UniquenessOptions
Source§impl Default for UniquenessOptions
impl Default for UniquenessOptions
Source§impl PartialEq for UniquenessOptions
impl PartialEq for UniquenessOptions
impl StructuralPartialEq for UniquenessOptions
Auto Trait Implementations§
impl Freeze for UniquenessOptions
impl RefUnwindSafe for UniquenessOptions
impl Send for UniquenessOptions
impl Sync for UniquenessOptions
impl Unpin for UniquenessOptions
impl UnwindSafe for UniquenessOptions
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> 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