Skip to main content

ReplSession

Trait ReplSession 

Source
pub trait ReplSession {
    // Required methods
    fn prompt(&self) -> String;
    async fn run_command(
        &mut self,
        command: &Command,
        json: bool,
    ) -> Result<String>;
    async fn login(&mut self, client_id_hex: &str) -> Result<String>;
}
Expand description

The state the REPL drives: the current identity and how to run commands against it.

Required Methods§

Source

fn prompt(&self) -> String

Source

async fn run_command(&mut self, command: &Command, json: bool) -> Result<String>

Source

async fn login(&mut self, client_id_hex: &str) -> Result<String>

Switches identity. On failure the current identity must be kept.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§