pub struct ExtensionWorkload { /* private fields */ }Expand description
GVK envelope for an application-provided workload.
spec must be a JSON object.
Its fields are owned by the application.
Implementations§
Source§impl ExtensionWorkload
impl ExtensionWorkload
Sourcepub fn new(
api_version: impl Into<String>,
kind: impl Into<String>,
spec: Value,
) -> ModelResult<Self>
pub fn new( api_version: impl Into<String>, kind: impl Into<String>, spec: Value, ) -> ModelResult<Self>
Creates an extension workload envelope.
The solti.io API group is reserved for built-in Solti workloads.
§Errors
Returns ModelError::Invalid for an invalid GVK, a reserved API group, or a non-object spec.
Sourcepub fn api_version(&self) -> &str
pub fn api_version(&self) -> &str
Workload API group and version.
Trait Implementations§
Source§impl Clone for ExtensionWorkload
impl Clone for ExtensionWorkload
Source§fn clone(&self) -> ExtensionWorkload
fn clone(&self) -> ExtensionWorkload
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 ExtensionWorkload
impl Debug for ExtensionWorkload
Source§impl<'de> Deserialize<'de> for ExtensionWorkload
impl<'de> Deserialize<'de> for ExtensionWorkload
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 ExtensionWorkload
Source§impl JsonSchema for ExtensionWorkload
impl JsonSchema for ExtensionWorkload
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 ExtensionWorkload
impl PartialEq for ExtensionWorkload
Source§impl Serialize for ExtensionWorkload
impl Serialize for ExtensionWorkload
impl StructuralPartialEq for ExtensionWorkload
Auto Trait Implementations§
impl Freeze for ExtensionWorkload
impl RefUnwindSafe for ExtensionWorkload
impl Send for ExtensionWorkload
impl Sync for ExtensionWorkload
impl Unpin for ExtensionWorkload
impl UnsafeUnpin for ExtensionWorkload
impl UnwindSafe for ExtensionWorkload
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