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, A>(&mut self, program: P, args: A) -> &mut Selfwhere P: Into<OsString>, A: IntoIterator, A::Item: Into<OsString>,

Configure the solver that will be used.

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 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 Selfwhere W: 'static + Write,

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.