#[non_exhaustive]pub struct ResourceLimit {
pub resource_type: String,
pub minimum: i64,
pub maximum: i64,
}Expand description
Contains information about amount of some resource in the cluster. For memory, value should be in GB.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.resource_type: StringResource name “cpu”, “memory” or gpu-specific string.
minimum: i64Minimum amount of the resource in the cluster.
maximum: i64Maximum amount of the resource in the cluster.
Implementations§
Source§impl ResourceLimit
impl ResourceLimit
Sourcepub fn set_resource_type<T: Into<String>>(self, v: T) -> Self
pub fn set_resource_type<T: Into<String>>(self, v: T) -> Self
Sets the value of resource_type.
Sourcepub fn set_minimum<T: Into<i64>>(self, v: T) -> Self
pub fn set_minimum<T: Into<i64>>(self, v: T) -> Self
Sets the value of minimum.
Sourcepub fn set_maximum<T: Into<i64>>(self, v: T) -> Self
pub fn set_maximum<T: Into<i64>>(self, v: T) -> Self
Sets the value of maximum.
Trait Implementations§
Source§impl Clone for ResourceLimit
impl Clone for ResourceLimit
Source§fn clone(&self) -> ResourceLimit
fn clone(&self) -> ResourceLimit
Returns a copy of the value. Read more
1.0.0 · 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 ResourceLimit
impl Debug for ResourceLimit
Source§impl Default for ResourceLimit
impl Default for ResourceLimit
Source§fn default() -> ResourceLimit
fn default() -> ResourceLimit
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ResourceLimitwhere
ResourceLimit: Default,
impl<'de> Deserialize<'de> for ResourceLimitwhere
ResourceLimit: Default,
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
Source§impl Message for ResourceLimit
impl Message for ResourceLimit
Source§impl PartialEq for ResourceLimit
impl PartialEq for ResourceLimit
Source§impl Serialize for ResourceLimit
impl Serialize for ResourceLimit
impl StructuralPartialEq for ResourceLimit
Auto Trait Implementations§
impl Freeze for ResourceLimit
impl RefUnwindSafe for ResourceLimit
impl Send for ResourceLimit
impl Sync for ResourceLimit
impl Unpin for ResourceLimit
impl UnwindSafe for ResourceLimit
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