pub enum ManagedExecutable {
CurrentServer,
Path(PathBuf),
}Expand description
The executable a managed worker instance launches.
Variants§
CurrentServer
This server’s own binary, resolved through the operating system at each
spawn. The production choice, and the only one a builtin artifact
reference can mean.
Path(PathBuf)
An explicit executable path. The seam supervision tests drive, so a test never risks re-executing the test binary itself.
Implementations§
Source§impl ManagedExecutable
impl ManagedExecutable
Sourcepub fn resolve(&self) -> Result<PathBuf, SupervisionError>
pub fn resolve(&self) -> Result<PathBuf, SupervisionError>
Resolve the path to launch.
§Errors
Returns SupervisionError::ExecutableUnresolved when the operating
system cannot identify this server’s own executable.
Sourcepub fn identify(&self, path: &Path) -> Result<SpawnedBinary, SupervisionError>
pub fn identify(&self, path: &Path) -> Result<SpawnedBinary, SupervisionError>
Capture the identity of path as this spawn will run it.
The build stamp is reported only for this server’s own binary: it is the only executable whose version and commit this process actually knows.
§Errors
Returns SupervisionError::ExecutableUnreadable when the bytes cannot
be read, which is also the honest report for a deployment naming a path
that no longer exists.
Trait Implementations§
Source§impl Clone for ManagedExecutable
impl Clone for ManagedExecutable
Source§fn clone(&self) -> ManagedExecutable
fn clone(&self) -> ManagedExecutable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ManagedExecutable
impl Debug for ManagedExecutable
impl Eq for ManagedExecutable
Source§impl PartialEq for ManagedExecutable
impl PartialEq for ManagedExecutable
impl StructuralPartialEq for ManagedExecutable
Auto Trait Implementations§
impl Freeze for ManagedExecutable
impl RefUnwindSafe for ManagedExecutable
impl Send for ManagedExecutable
impl Sync for ManagedExecutable
impl Unpin for ManagedExecutable
impl UnsafeUnpin for ManagedExecutable
impl UnwindSafe for ManagedExecutable
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request