pub struct SimplexCli { /* private fields */ }Available on crate feature
cli only.Expand description
An instance representing the running SimpleX CLI. Ensure to call SimplexCli::kill manually
to avoid zombie/hang processes on Linux. The Drop impl tries its best to reap the process if it
wasn’t killed by the user but it is not guarnteed to succeed.
§Security
- SimpleX CLI requires to pass the database key via the
-kargument. On most Linux setups the-kparameter is readable fromps fxoutput and/procby any user so SimplexCliBuilder::db_key doesn’t provide any meaningful security on untrusted machines
Implementations§
Source§impl SimplexCli
impl SimplexCli
Sourcepub fn builder(
default_bot_name: impl Into<String>,
port: u16,
) -> SimplexCliBuilder
pub fn builder( default_bot_name: impl Into<String>, port: u16, ) -> SimplexCliBuilder
Begin building a SimplexCli that will spawn a simplex-chat process.
Call SimplexCliBuilder::spawn to launch the process after configuring the builder.
pub fn port(&self) -> u16
pub fn version(&self) -> &SimplexVersion
Trait Implementations§
Source§impl Drop for SimplexCli
impl Drop for SimplexCli
Auto Trait Implementations§
impl Freeze for SimplexCli
impl !RefUnwindSafe for SimplexCli
impl Send for SimplexCli
impl Sync for SimplexCli
impl Unpin for SimplexCli
impl UnsafeUnpin for SimplexCli
impl !UnwindSafe for SimplexCli
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