pub struct ShellSessionRegistry { /* private fields */ }Expand description
The SSH servers a shell’s commands may run on, as the embedder prepared them.
The home environment is the shell’s Sandbox: its
backend says where commands with no location run.
Cloning shares the SSH server set: a server added or removed through one holder is seen by every other, the terminals of subagents included.
Implementations§
Source§impl ShellSessionRegistry
impl ShellSessionRegistry
Sourcepub fn add_ssh_server(
&self,
server: SshServer,
prepare: impl PrepareSsh,
) -> Result<(), SshServerError>
pub fn add_ssh_server( &self, server: SshServer, prepare: impl PrepareSsh, ) -> Result<(), SshServerError>
Adds server to the set commands may run on, for every holder of this
registry. Its name and target are trimmed.
The server is not contacted: prepare runs when the first command
names it, see PrepareSsh. A PreparedSsh
is a preparation already done.
§Errors
Rejects a blank name or target and a name another server has.
Sourcepub fn remove_ssh_server(&self, name: &str) -> Option<SshServer>
pub fn remove_ssh_server(&self, name: &str) -> Option<SshServer>
Removes the server named name, returning it; None when no server
has that name. Commands already running there keep running; the next
command naming it fails.
Sourcepub fn ssh_servers(&self) -> Vec<SshServer>
pub fn ssh_servers(&self) -> Vec<SshServer>
The SSH servers commands may run on now, in the order they were added.
Trait Implementations§
Source§impl Clone for ShellSessionRegistry
impl Clone for ShellSessionRegistry
Source§impl Debug for ShellSessionRegistry
impl Debug for ShellSessionRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for ShellSessionRegistry
impl !UnwindSafe for ShellSessionRegistry
impl Forget for ShellSessionRegistry
impl Freeze for ShellSessionRegistry
impl Move for ShellSessionRegistry
impl Send for ShellSessionRegistry
impl Sync for ShellSessionRegistry
impl Unpin for ShellSessionRegistry
impl UnsafeUnpin for ShellSessionRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more