QuickSession

Struct QuickSession 

Source
pub struct QuickSession;
Expand description

Quick session configuration for common use cases.

Implementations§

Source§

impl QuickSession

Source

pub fn shell() -> SessionConfig

Create a session config for a shell command.

Source

pub fn bash() -> SessionConfig

Create a session config for bash.

Source

pub fn command(cmd: impl Into<String>) -> SessionConfig

Create a session config for a custom command.

Source

pub fn ssh(host: &str) -> SessionConfig

Create a session config for SSH.

Source

pub fn ssh_user(user: &str, host: &str) -> SessionConfig

Create a session config for SSH with user.

Source

pub fn telnet(host: &str, port: u16) -> SessionConfig

Create a session config for telnet.

Source

pub fn python() -> SessionConfig

Create a session config for Python.

Source

pub fn cmd() -> SessionConfig

Create a session config for Windows Command Prompt.

This configures a cmd.exe session with Windows-style line endings.

Source

pub fn powershell() -> SessionConfig

Create a session config for PowerShell.

Works with both Windows PowerShell (powershell.exe) and PowerShell Core (pwsh.exe). Defaults to powershell.exe on Windows, pwsh on other platforms.

Source

pub fn zsh() -> SessionConfig

Create a session config for zsh.

Source

pub fn fish() -> SessionConfig

Create a session config for fish shell.

Source

pub fn repl(cmd: impl Into<String>) -> SessionConfig

Create a session config for a REPL.

Source

pub fn node() -> SessionConfig

Create a session config for Node.js REPL.

Source

pub fn ruby() -> SessionConfig

Create a session config for Ruby IRB.

Source

pub fn mysql(host: &str, user: &str, database: &str) -> SessionConfig

Create a session config for MySQL client.

Source

pub fn mysql_password(host: &str, user: &str, database: &str) -> SessionConfig

Create a session config for MySQL client with password prompt.

Source

pub fn psql(host: &str, user: &str, database: &str) -> SessionConfig

Create a session config for PostgreSQL client.

Source

pub fn docker_exec(container: &str) -> SessionConfig

Create a session config for Docker exec into a container.

Source

pub fn docker_exec_shell(container: &str, shell: &str) -> SessionConfig

Create a session config for Docker exec with a specific shell.

Source

pub fn docker_run(image: &str) -> SessionConfig

Create a session config for Docker run with interactive shell.

Source

pub fn redis_cli(host: &str) -> SessionConfig

Create a session config for Redis CLI.

Source

pub fn mongosh(uri: &str) -> SessionConfig

Create a session config for MongoDB shell.

Source

pub fn sqlite(database: &str) -> SessionConfig

Create a session config for SQLite.

Source

pub fn gdb(program: &str) -> SessionConfig

Create a session config for GDB debugger.

Source

pub fn lldb(program: &str) -> SessionConfig

Create a session config for LLDB debugger.

Source

pub fn lua() -> SessionConfig

Create a session config for Lua REPL.

Source

pub fn perl() -> SessionConfig

Create a session config for Perl debugger.

Source

pub fn r() -> SessionConfig

Create a session config for R REPL.

Source

pub fn julia() -> SessionConfig

Create a session config for Julia REPL.

Source

pub fn scala() -> SessionConfig

Create a session config for Scala REPL.

Source

pub fn iex() -> SessionConfig

Create a session config for Elixir IEx.

Source

pub fn clojure() -> SessionConfig

Create a session config for Clojure REPL.

Source

pub fn ghci() -> SessionConfig

Create a session config for Haskell GHCi.

Source

pub fn ocaml() -> SessionConfig

Create a session config for OCaml REPL.

Source

pub fn kubectl_exec(pod: &str) -> SessionConfig

Create a session config for kubectl exec into a pod.

Source

pub fn kubectl_exec_ns(namespace: &str, pod: &str, shell: &str) -> SessionConfig

Create a session config for kubectl exec with namespace.

Source

pub fn screen_attach(session_name: &str) -> SessionConfig

Create a session config for screen attach.

Source

pub fn tmux_attach(session_name: &str) -> SessionConfig

Create a session config for tmux attach.

Source

pub fn ssh_port(host: &str, port: u16) -> SessionConfig

Create a session config for SSH with a specific port.

Source

pub fn ssh_full(user: &str, host: &str, port: u16) -> SessionConfig

Create a session config for SSH with user and port.

Source

pub fn ssh_key(user: &str, host: &str, key_file: &str) -> SessionConfig

Create a session config for SSH with a specific identity file.

Source

pub fn vagrant_ssh() -> SessionConfig

Create a session config for Vagrant SSH.

Source

pub fn vagrant_ssh_machine(machine: &str) -> SessionConfig

Create a session config for Vagrant SSH to a specific machine.

Source

pub fn sftp(host: &str) -> SessionConfig

Create a session config for SFTP.

Source

pub fn sftp_user(user: &str, host: &str) -> SessionConfig

Create a session config for SFTP with user.

Source

pub fn ftp(host: &str) -> SessionConfig

Create a session config for FTP.

Source

pub fn netcat(host: &str, port: u16) -> SessionConfig

Create a session config for netcat interactive mode.

Source

pub fn socat(address: &str) -> SessionConfig

Create a session config for socat interactive mode.

Source

pub fn minicom(device: &str) -> SessionConfig

Create a session config for minicom serial terminal.

Source

pub fn screen_serial(device: &str, baud_rate: u32) -> SessionConfig

Create a session config for screen serial terminal.

Source

pub fn picocom(device: &str, baud_rate: u32) -> SessionConfig

Create a session config for picocom serial terminal.

Source

pub fn aws_ssm(instance_id: &str) -> SessionConfig

Create a session config for AWS SSM session.

Source

pub fn az_serial_console(resource_group: &str, vm_name: &str) -> SessionConfig

Create a session config for Azure VM serial console.

Source

pub fn gcloud_ssh(instance: &str, zone: &str) -> SessionConfig

Create a session config for GCP SSH.

Source

pub fn evcxr() -> SessionConfig

Create a session config for Rust REPL (evcxr).

Source

pub fn gore() -> SessionConfig

Create a session config for Go playground.

Source

pub fn php() -> SessionConfig

Create a session config for PHP interactive mode.

Source

pub fn swift() -> SessionConfig

Create a session config for Swift REPL.

Source

pub fn kotlin() -> SessionConfig

Create a session config for Kotlin REPL.

Source

pub fn groovysh() -> SessionConfig

Create a session config for Groovy console.

Source

pub fn ts_node() -> SessionConfig

Create a session config for TypeScript REPL (ts-node).

Source

pub fn deno() -> SessionConfig

Create a session config for Deno REPL.

Source

pub fn bun() -> SessionConfig

Create a session config for Bun REPL.

Source

pub fn default_shell() -> String

Get the default shell for the current platform.

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V