pub struct ProjectKind;Expand description
Per-project kernels.
Trait Implementations§
Source§impl Clone for ProjectKind
impl Clone for ProjectKind
impl Copy for ProjectKind
Source§impl Debug for ProjectKind
impl Debug for ProjectKind
Source§impl Default for ProjectKind
impl Default for ProjectKind
Source§impl WorkloadKind for ProjectKind
impl WorkloadKind for ProjectKind
Source§fn migratable(&self) -> bool
fn migratable(&self) -> bool
A project kernel is bound to its user daemon’s host: never moved.
Source§fn health(&self) -> HealthSpec
fn health(&self) -> HealthSpec
How often instances of this kind are polled and how many bad polls
in a row make one unhealthy (ADR-099 section 7).
Source§fn validate(&self, _envelope: &ManifestEnvelope) -> Result<(), ManifestError>
fn validate(&self, _envelope: &ManifestEnvelope) -> Result<(), ManifestError>
Validate the envelope’s kind-specific body (shape and limits; not
signatures or file contents, which are kind-agnostic).
Source§fn load(
&self,
_package_dir: &Path,
_anchors: &TrustAnchors,
_kinds: &KindRegistry,
) -> Result<VerifiedWorkload, PlaneError>
fn load( &self, _package_dir: &Path, _anchors: &TrustAnchors, _kinds: &KindRegistry, ) -> Result<VerifiedWorkload, PlaneError>
Verify the signed package in
package_dir against anchors (with
kinds as the registry the manifest is checked against) and load it
as a runnable workload. Must refuse a manifest whose kind is not
id.Source§fn spec(&self, workload: &VerifiedWorkload) -> Result<WorkloadSpec, String>
fn spec(&self, workload: &VerifiedWorkload) -> Result<WorkloadSpec, String>
The placement requirements for a loaded workload of this kind.
Source§fn adapters(&self) -> &'static [&'static str]
fn adapters(&self) -> &'static [&'static str]
Adapter route names that can run this kind (
native, container,
emulated, remote.api, …).Source§fn judge(&self, sample: &HealthSample) -> Health
fn judge(&self, sample: &HealthSample) -> Health
Judge one poll of an instance of this kind. The default is the
process-backed judgment (
judge_process).Auto Trait Implementations§
impl Freeze for ProjectKind
impl RefUnwindSafe for ProjectKind
impl Send for ProjectKind
impl Sync for ProjectKind
impl Unpin for ProjectKind
impl UnsafeUnpin for ProjectKind
impl UnwindSafe for ProjectKind
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