Enum Dynamic
pub enum Dynamic<'a, S: SmtSolver<'a>> {
BV(S::BV),
Int(S::Int),
Bool(S::Bool),
BvArray(S::BvArray),
}
Expand description
An expression that is dynamically typed.
Variants§
BV(S::BV)
A bitvector.
Int(S::Int)
An integer.
Bool(S::Bool)
A boolean.
BvArray(S::BvArray)
An array.
Implementations§
§impl<'a, S: SmtSolver<'a>> Dynamic<'a, S>
impl<'a, S: SmtSolver<'a>> Dynamic<'a, S>
pub fn as_bv(self) -> Option<S::BV>
pub fn as_bv(self) -> Option<S::BV>
If the expression is a bitvector, returns the bitvector.
Otherwise, returns None
.
pub fn as_int(self) -> Option<S::Int>
pub fn as_int(self) -> Option<S::Int>
If the expression is an integer, returns the integer.
Otherwise, returns None
.
pub fn as_bool(self) -> Option<S::Bool>
pub fn as_bool(self) -> Option<S::Bool>
If the expression is a bool, returns the bool.
Otherwise, returns None
.
pub fn as_bv_array(self) -> Option<S::BvArray>
pub fn as_bv_array(self) -> Option<S::BvArray>
If the expression is a bitvector array, returns the array.
Otherwise, returns None
.
pub fn simplify(self) -> Self
pub fn simplify(self) -> Self
Simplifies, if possible, the SMT expression.
pub fn is_identical(&self, other: &Self) -> bool
pub fn is_identical(&self, other: &Self) -> bool
Returns true if both expressions are structurally identical.
Panics if the expressions are not of the same type.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for Dynamic<'a, S>
impl<'a, S> RefUnwindSafe for Dynamic<'a, S>where
<S as SmtSolver<'a>>::BV: RefUnwindSafe,
<S as SmtSolver<'a>>::Int: RefUnwindSafe,
<S as SmtSolver<'a>>::Bool: RefUnwindSafe,
<S as SmtSolver<'a>>::BvArray: RefUnwindSafe,
impl<'a, S> Send for Dynamic<'a, S>
impl<'a, S> Sync for Dynamic<'a, S>
impl<'a, S> Unpin for Dynamic<'a, S>
impl<'a, S> UnwindSafe for Dynamic<'a, S>where
<S as SmtSolver<'a>>::BV: UnwindSafe,
<S as SmtSolver<'a>>::Int: UnwindSafe,
<S as SmtSolver<'a>>::Bool: UnwindSafe,
<S as SmtSolver<'a>>::BvArray: UnwindSafe,
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> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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