pub struct RunnerCapability { /* private fields */ }Expand description
One registered runner and the workload GVKs it can execute.
Labels are the same static labels used by runnerSelector.
Implementations§
Source§impl RunnerCapability
impl RunnerCapability
Sourcepub fn new(
name: impl Into<String>,
labels: Labels,
workload_types: Vec<WorkloadTypeMeta>,
) -> ModelResult<Self>
pub fn new( name: impl Into<String>, labels: Labels, workload_types: Vec<WorkloadTypeMeta>, ) -> ModelResult<Self>
Creates a registered runner capability.
Workload types are stored in canonical GVK order.
§Errors
Returns ModelError::Invalid when the name or labels are invalid, no workload is declared, a GVK is duplicated, or Embedded is declared.
Sourcepub fn workload_types(&self) -> &[WorkloadTypeMeta]
pub fn workload_types(&self) -> &[WorkloadTypeMeta]
Canonically ordered workload GVKs handled by the runner.
Trait Implementations§
Source§impl Clone for RunnerCapability
impl Clone for RunnerCapability
Source§fn clone(&self) -> RunnerCapability
fn clone(&self) -> RunnerCapability
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RunnerCapability
impl Debug for RunnerCapability
Source§impl<'de> Deserialize<'de> for RunnerCapability
impl<'de> Deserialize<'de> for RunnerCapability
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RunnerCapability
Source§impl JsonSchema for RunnerCapability
impl JsonSchema for RunnerCapability
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for RunnerCapability
impl PartialEq for RunnerCapability
Source§impl Serialize for RunnerCapability
impl Serialize for RunnerCapability
impl StructuralPartialEq for RunnerCapability
Auto Trait Implementations§
impl Freeze for RunnerCapability
impl RefUnwindSafe for RunnerCapability
impl Send for RunnerCapability
impl Sync for RunnerCapability
impl Unpin for RunnerCapability
impl UnsafeUnpin for RunnerCapability
impl UnwindSafe for RunnerCapability
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