pub enum Domain {
BoolDomain,
IntDomain(Vec<Range<i32>>),
}
Variants§
Implementations§
Source§impl Domain
impl Domain
Sourcepub fn values_i32(&self) -> Option<Vec<i32>>
pub fn values_i32(&self) -> Option<Vec<i32>>
Return a list of all possible i32 values in the domain if it is an IntDomain.
Sourcepub fn apply_i32(
&self,
op: fn(_: i32, _: i32) -> Option<i32>,
other: &Domain,
) -> Option<Domain>
pub fn apply_i32( &self, op: fn(_: i32, _: i32) -> Option<i32>, other: &Domain, ) -> Option<Domain>
Return an unoptimised domain that is the result of applying a binary i32 operation to two domains.
The given operator may return None if the operation is not defined for its arguments. Undefined values will not be included in the resulting domain.
Returns None if the domains are not valid for i32 operations.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Domain
impl<'de> Deserialize<'de> for Domain
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Domain, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Domain, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Domain
impl Serialize for Domain
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Domain
impl StructuralPartialEq for Domain
Auto Trait Implementations§
impl Freeze for Domain
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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