pub struct EscrowOperation { /* private fields */ }Expand description
Holds the process lifecycle channel (or optionally just the control side of it), and uses it to send escrow data and handles to component manager. This is a required step for a component to gracefully shut itself down when it would otherwise sit idle, in order to save system resources.
Implementations§
Source§impl EscrowOperation
impl EscrowOperation
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new EscrowOperation by taking the process lifecycle handle. Does not actually
perform the escrow operation, see Self::run.
Sourcepub fn new_with_lifecycle_handle(
lifecycle_handle: ServerEnd<LifecycleMarker>,
) -> Self
pub fn new_with_lifecycle_handle( lifecycle_handle: ServerEnd<LifecycleMarker>, ) -> Self
Creates a new EscrowOperation with the provided process lifecycle handle. Does not
actually perform the escrow operation, see Self::run.
Sourcepub fn new_with_control_handle(control_handle: LifecycleControlHandle) -> Self
pub fn new_with_control_handle(control_handle: LifecycleControlHandle) -> Self
Creates a new EscrowOperation with the provided process lifecycle control handle. Does
not actually perform the escrow operation, see Self::run.
Sourcepub fn with_fsandbox_dictionary(&self, fsandbox_dictionary: DictionaryRef)
pub fn with_fsandbox_dictionary(&self, fsandbox_dictionary: DictionaryRef)
Adds a dictionary handle to the escrow operation, which will be returned to us when if/when we are restarted.
Deprecated, prefer with_dictionary.
Sourcepub fn with_dictionary(&self, dictionary: Dictionary)
pub fn with_dictionary(&self, dictionary: Dictionary)
Adds a dictionary handle to the escrow operation, which will be returned to us when if/when we are restarted.
Sourcepub fn watch_for_stop(&self) -> Result<(), Error>
pub fn watch_for_stop(&self) -> Result<(), Error>
Starts a new async task that watches the process lifecycle handle for a stop instruction, and exits this process if/when such a signal is received.
Trait Implementations§
Source§impl Clone for EscrowOperation
impl Clone for EscrowOperation
Source§fn clone(&self) -> EscrowOperation
fn clone(&self) -> EscrowOperation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for EscrowOperation
impl Default for EscrowOperation
Source§fn default() -> EscrowOperation
fn default() -> EscrowOperation
Auto Trait Implementations§
impl !RefUnwindSafe for EscrowOperation
impl !UnwindSafe for EscrowOperation
impl Freeze for EscrowOperation
impl Send for EscrowOperation
impl Sync for EscrowOperation
impl Unpin for EscrowOperation
impl UnsafeUnpin for EscrowOperation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]