pub struct MuxPlugin { /* private fields */ }
Implementations§
Source§impl MuxPlugin
impl MuxPlugin
Sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
examples/basic.rs (line 11)
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
fn main() {
// the remote supplied here currently does not support interactive passwords, use an ssh key
// without a password for now :((
// let ssh_remote = env::var("SHRS_SSH_ADDRESS").unwrap();
let mux_plugin = MuxPlugin::new()
.register_lang("bash", BashLang::new())
.register_lang("python", PythonLang::new())
.register_lang("nu", NuLang::new())
// .register_lang("ssh", SshLang::new(ssh_remote))
.register_lang("sqlite", SqliteLang::new(Path::new("/tmp/test.sqlite")));
let myshell = ShellBuilder::default()
.with_plugin(mux_plugin)
.build()
.unwrap();
myshell.run().unwrap();
}
Sourcepub fn register_lang(self, name: &str, lang: impl Lang + 'static) -> Self
pub fn register_lang(self, name: &str, lang: impl Lang + 'static) -> Self
Examples found in repository?
examples/basic.rs (line 12)
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
fn main() {
// the remote supplied here currently does not support interactive passwords, use an ssh key
// without a password for now :((
// let ssh_remote = env::var("SHRS_SSH_ADDRESS").unwrap();
let mux_plugin = MuxPlugin::new()
.register_lang("bash", BashLang::new())
.register_lang("python", PythonLang::new())
.register_lang("nu", NuLang::new())
// .register_lang("ssh", SshLang::new(ssh_remote))
.register_lang("sqlite", SqliteLang::new(Path::new("/tmp/test.sqlite")));
let myshell = ShellBuilder::default()
.with_plugin(mux_plugin)
.build()
.unwrap();
myshell.run().unwrap();
}
pub fn register_theme( self, name: &str, syntax_theme: Box<dyn SyntaxTheme>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MuxPlugin
impl !RefUnwindSafe for MuxPlugin
impl !Send for MuxPlugin
impl !Sync for MuxPlugin
impl Unpin for MuxPlugin
impl !UnwindSafe for MuxPlugin
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
Mutably borrows from an owned value. Read more