pub struct Z3Sort {
pub id: SortId,
/* private fields */
}Expand description
Analogue of z3::Sort.
A lightweight handle pairing a SortId with the owning context’s
TermManager, so that the sort can be introspected (kind, bit-width,
array domain/range, name) after the fact.
Fields§
§id: SortIdThe underlying sort identifier.
Implementations§
Source§impl Z3Sort
impl Z3Sort
Sourcepub fn new(ctx: &Z3Context, id: SortId) -> Self
pub fn new(ctx: &Z3Context, id: SortId) -> Self
Wrap a raw SortId together with the context it belongs to.
Sourcepub fn kind(&self) -> Z3SortKind
pub fn kind(&self) -> Z3SortKind
Return the high-level Z3SortKind of this sort.
Sourcepub fn bv_size(&self) -> Option<u32>
pub fn bv_size(&self) -> Option<u32>
If this is a bit-vector sort, return its width in bits.
Returns None for every other sort kind.
Sourcepub fn array_domain(&self) -> Option<Z3Sort>
pub fn array_domain(&self) -> Option<Z3Sort>
If this is an array sort, return its domain (index) sort.
Returns None for every other sort kind.
Sourcepub fn array_range(&self) -> Option<Z3Sort>
pub fn array_range(&self) -> Option<Z3Sort>
If this is an array sort, return its range (element) sort.
Returns None for every other sort kind.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Z3Sort
impl !RefUnwindSafe for Z3Sort
impl !Send for Z3Sort
impl !Sync for Z3Sort
impl Unpin for Z3Sort
impl UnsafeUnpin for Z3Sort
impl !UnwindSafe for Z3Sort
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