pub trait PredicateValue: Clone {
type Borrowed<'a>: ?Sized
where Self: 'a;
// Required methods
fn borrowed(value: &Self) -> &Self::Borrowed<'_>;
fn equals(value: &Self::Borrowed<'_>, target: &Self) -> bool;
fn compare(value: &Self::Borrowed<'_>, target: &Self) -> Option<Ordering>;
// Provided methods
fn contains(
value: &Self::Borrowed<'_>,
target: &Self,
case_sensitive: bool,
) -> bool { ... }
fn starts_with(
value: &Self::Borrowed<'_>,
target: &Self,
case_sensitive: bool,
) -> bool { ... }
fn ends_with(
value: &Self::Borrowed<'_>,
target: &Self,
case_sensitive: bool,
) -> bool { ... }
}Required Associated Types§
Required Methods§
fn borrowed(value: &Self) -> &Self::Borrowed<'_>
fn equals(value: &Self::Borrowed<'_>, target: &Self) -> bool
fn compare(value: &Self::Borrowed<'_>, target: &Self) -> Option<Ordering>
Provided Methods§
fn contains( value: &Self::Borrowed<'_>, target: &Self, case_sensitive: bool, ) -> bool
fn starts_with( value: &Self::Borrowed<'_>, target: &Self, case_sensitive: bool, ) -> bool
fn ends_with( value: &Self::Borrowed<'_>, target: &Self, case_sensitive: bool, ) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.