pub struct PmHandle { /* private fields */ }Expand description
Cloneable handle for sending commands to the ProcessManagerActor.
Implementations§
Source§impl PmHandle
impl PmHandle
pub async fn spawn_process( &self, command: String, name: Option<String>, cwd: Option<String>, env: Option<HashMap<String, String>>, port: Option<u16>, ) -> Response
pub async fn spawn_process_supervised( &self, command: String, name: Option<String>, cwd: Option<String>, env: Option<HashMap<String, String>>, port: Option<u16>, restart: Option<RestartPolicy>, watch: Option<WatchConfig>, ) -> Response
pub async fn stop_process(&self, target: &str) -> Response
pub async fn stop_all(&self) -> Response
pub async fn restart_process(&self, target: &str) -> Response
pub async fn status(&self) -> Response
pub async fn status_snapshot(&self) -> Response
pub async fn has_process(&self, target: &str) -> bool
pub async fn session_name(&self) -> String
pub async fn is_process_exited(&self, target: &str) -> Option<Option<i32>>
Sourcepub async fn enable_proxy(&self, proxy_port: u16) -> Option<u16>
pub async fn enable_proxy(&self, proxy_port: u16) -> Option<u16>
Enable proxy with the given port. Returns Some(existing_port) if already enabled.
pub async fn subscribe(&self) -> Receiver<OutputLine>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PmHandle
impl RefUnwindSafe for PmHandle
impl Send for PmHandle
impl Sync for PmHandle
impl Unpin for PmHandle
impl UnsafeUnpin for PmHandle
impl UnwindSafe for PmHandle
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
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>
Converts
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>
Converts
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