pub struct Fun<'st> {
pub st: &'st Storage,
pub name: &'st str,
pub vars: &'st [Sort<'st>],
pub return_sort: Sort<'st>,
}
Expand description
A function declaration.
Fields§
§st: &'st Storage
smtlib storage
name: &'st str
The name of the function.
vars: &'st [Sort<'st>]
The sorts of the arguments.
return_sort: Sort<'st>
The sort of the return value.
Implementations§
Source§impl<'st> Fun<'st>
impl<'st> Fun<'st>
Sourcepub fn new(
st: &'st Storage,
name: impl Into<String>,
vars: Vec<Sort<'st>>,
return_ty: Sort<'st>,
) -> Self
pub fn new( st: &'st Storage, name: impl Into<String>, vars: Vec<Sort<'st>>, return_ty: Sort<'st>, ) -> Self
Create a new function declaration.
Sourcepub fn call(&self, args: &[Dynamic<'st>]) -> Result<Dynamic<'st>, Error>
pub fn call(&self, args: &[Dynamic<'st>]) -> Result<Dynamic<'st>, Error>
Call the function with the given arguments.
The arguments must be sorted in the same order as the function declaration and checked for both arity and sort.
Sourcepub fn ast(&self) -> FunctionDec<'_>
pub fn ast(&self) -> FunctionDec<'_>
Get the lowlevel AST representation of the function declaration.
Trait Implementations§
Auto Trait Implementations§
impl<'st> Freeze for Fun<'st>
impl<'st> !RefUnwindSafe for Fun<'st>
impl<'st> !Send for Fun<'st>
impl<'st> !Sync for Fun<'st>
impl<'st> Unpin for Fun<'st>
impl<'st> !UnwindSafe for Fun<'st>
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> 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 moreSource§impl<'st, T> IntoWithStorage<'st, T> for T
impl<'st, T> IntoWithStorage<'st, T> for T
Source§fn into_with_storage(self, _st: &'st Storage) -> T
fn into_with_storage(self, _st: &'st Storage) -> T
Construct a
STerm
with the presence of Storage