[−][src]Struct z3::FuncDecl
Function declaration. Every constant and function have an associated declaration.
The declaration assigns a name, a sort (i.e., type), and for function the sort (i.e., type) of each of its arguments. Note that, in Z3, a constant is a function with 0 arguments.
Implementations
impl<'ctx> FuncDecl<'ctx>
[src]
pub fn new<S: Into<Symbol>>(
ctx: &'ctx Context,
name: S,
domain: &[&Sort<'ctx>],
range: &Sort<'ctx>
) -> Self
[src]
ctx: &'ctx Context,
name: S,
domain: &[&Sort<'ctx>],
range: &Sort<'ctx>
) -> Self
pub unsafe fn from_raw(ctx: &'ctx Context, z3_func_decl: Z3_func_decl) -> Self
[src]
pub fn arity(&self) -> usize
[src]
Return the number of arguments of a function declaration.
If the function declaration is a constant, then the arity is 0
.
let f = FuncDecl::new( &ctx, "f", &[&Sort::int(&ctx), &Sort::real(&ctx)], &Sort::int(&ctx)); assert_eq!(f.arity(), 2);
pub fn apply(&self, args: &[&Dynamic<'ctx>]) -> Dynamic<'ctx>
[src]
Create a constant (if args
has length 0) or function application (otherwise).
Note that args
should have the types corresponding to the domain
of the FuncDecl
.
Trait Implementations
impl<'ctx> Debug for FuncDecl<'ctx>
[src]
impl<'ctx> Display for FuncDecl<'ctx>
[src]
impl<'ctx> Drop for FuncDecl<'ctx>
[src]
Auto Trait Implementations
impl<'ctx> RefUnwindSafe for FuncDecl<'ctx>
impl<'ctx> !Send for FuncDecl<'ctx>
impl<'ctx> !Sync for FuncDecl<'ctx>
impl<'ctx> Unpin for FuncDecl<'ctx>
impl<'ctx> UnwindSafe for FuncDecl<'ctx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,