Struct ContextBuilder

Source
pub struct ContextBuilder { /* private fields */ }

Implementations§

Source§

impl ContextBuilder

Source

pub fn new() -> Self

Construct a new builder with the default configuration.

Source

pub fn solver<P>(&mut self, program: P) -> &mut Self
where P: Into<OsString>,

Configure the solver that will be used.

You can pass arguments to the underlying solver via the solver_args method.

By default, no solver is configured, and any Context created will only be able to build and display expressions, not assert them or query for their satisfiability.

Source

pub fn solver_args<A>(&mut self, args: A) -> &mut Self
where A: IntoIterator, A::Item: Into<OsString>,

Configure the arguments that will be passed to the solver.

By default, no arguments are passed to the solver.

Source

pub fn without_solver(&mut self) -> &mut Self

Clear the solver configuration, if any.

This returns to the default, no-solver configuration, where any Context created will only be able to build and display expressions, not assert them or query for their satisfiability.

Source

pub fn replay_file<W>(&mut self, replay_file: Option<W>) -> &mut Self
where W: 'static + Write + Send,

An optional file (or anything else that is std::io::Write-able) where all solver queries and commands are tee’d too.

This let’s you replay interactions with the solver offline, without needing to dynamically rebuild your expressions, queries, or commands.

This is unused if no solver is configured.

By default, there is no replay file configured.

Source

pub fn build(&mut self) -> Result<Context>

Finish configuring the context and build it.

Trait Implementations§

Source§

impl Default for ContextBuilder

Source§

fn default() -> ContextBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.