pub struct WorkloadRequirements {
pub name: String,
pub resource_requirements: Vec<ResourceRequirement>,
pub workload: Option<Box<dyn Workload>>,
pub priority: WorkloadPriority,
pub performance_targets: PerformanceTargets,
pub created_at: DateTime<Utc>,
}Expand description
Workload requirements specification
Fields§
§name: StringWorkload name/identifier
resource_requirements: Vec<ResourceRequirement>Resource requirements
workload: Option<Box<dyn Workload>>Specific workload details
priority: WorkloadPriorityPriority level
performance_targets: PerformanceTargetsPerformance targets
created_at: DateTime<Utc>Created timestamp
Implementations§
Source§impl WorkloadRequirements
impl WorkloadRequirements
Sourcepub fn add_resource_requirement(&mut self, requirement: ResourceRequirement)
pub fn add_resource_requirement(&mut self, requirement: ResourceRequirement)
Add a resource requirement
Sourcepub fn set_workload(&mut self, workload: Box<dyn Workload>)
pub fn set_workload(&mut self, workload: Box<dyn Workload>)
Set the workload
Sourcepub fn set_priority(&mut self, priority: WorkloadPriority)
pub fn set_priority(&mut self, priority: WorkloadPriority)
Set the priority
Sourcepub fn set_performance_targets(&mut self, targets: PerformanceTargets)
pub fn set_performance_targets(&mut self, targets: PerformanceTargets)
Set performance targets
Sourcepub fn get_resource_requirement(
&self,
resource_type: &ResourceType,
) -> Option<&ResourceRequirement>
pub fn get_resource_requirement( &self, resource_type: &ResourceType, ) -> Option<&ResourceRequirement>
Get resource requirement by type
Trait Implementations§
Source§impl Clone for WorkloadRequirements
impl Clone for WorkloadRequirements
Auto Trait Implementations§
impl Freeze for WorkloadRequirements
impl !RefUnwindSafe for WorkloadRequirements
impl Send for WorkloadRequirements
impl Sync for WorkloadRequirements
impl Unpin for WorkloadRequirements
impl !UnwindSafe for WorkloadRequirements
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