Struct IsabelleClient

Source
pub struct IsabelleClient { /* private fields */ }
Expand description

Provides interaction with Isabelle servers.

Implementations§

Source§

impl IsabelleClient

Source

pub fn connect(address: Option<&str>, port: u32, pass: &str) -> Self

Connect to an Isabelle server.

§Arguments
  • address: specifies the server address. If it is None, “127.0.0.1” is use as a default
  • port: specifies the server port
  • pass: the password
Source

pub fn for_server(server: &IsabelleServer) -> Self

Connect to an Isabelle server using the information from a IsabelleServer instance.

Source

pub async fn echo( &mut self, echo: &str, ) -> Result<SyncResult<String, String>, Error>

Identity function: Returns its argument as result

Source

pub async fn shutdown(&mut self) -> Result<SyncResult<(), String>, Error>

Forces a shut- down of the connected server process, stopping all open sessions and closing the server socket. This may disrupt pending commands on other connections.

Source

pub async fn cancel( &mut self, task_id: String, ) -> Result<SyncResult<(), ()>, Error>

Attempts to cancel the specified task. Cancellation is merely a hint that the client prefers an ongoing process to be stopped.

Source

pub async fn session_build( &mut self, args: &SessionBuildArgs, ) -> Result<AsyncResult<SessionBuildResults, SessionBuildResults>, Error>

Prepares a session image for interactive use of theories.

Source

pub async fn session_start( &mut self, args: &SessionBuildArgs, ) -> Result<AsyncResult<SessionStartResult, ()>, Error>

Starts a new Isabelle/PIDE session with underlying Isabelle/ML process, based on a session image that it produces on demand using session_build. Returns the session_id, which provides the internal identification of the session object within the server process.

Source

pub async fn session_stop( &mut self, args: &SessionStopArgs, ) -> Result<AsyncResult<SessionStopResult, SessionStopResult>, Error>

Forces a shutdown of the identified session.

Source

pub async fn use_theories( &mut self, args: &UseTheoriesArgs, ) -> Result<AsyncResult<UseTheoryResults, ()>, Error>

Updates the identified session by adding the current version of theory files to it, while dependencies are resolved implicitly.

Source

pub async fn purge_theories( &mut self, args: PurgeTheoryArgs, ) -> Result<SyncResult<PurgeTheoryResults, ()>, Error>

Updates the identified session by removing theories. Theories that are used in pending use_theories tasks or imported by other theories are retained.

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.