Struct zombienet_configuration::shared::resources::ResourcesBuilder
source · pub struct ResourcesBuilder { /* private fields */ }
Expand description
A resources builder, used to build a Resources
declaratively with fields validation.
Implementations§
source§impl ResourcesBuilder
impl ResourcesBuilder
pub fn new() -> ResourcesBuilder
sourcepub fn with_request_memory<T>(self, quantity: T) -> Self
pub fn with_request_memory<T>(self, quantity: T) -> Self
Set the requested memory for a pod. This is the minimum memory allocated for a pod.
sourcepub fn with_request_cpu<T>(self, quantity: T) -> Self
pub fn with_request_cpu<T>(self, quantity: T) -> Self
Set the requested CPU limit for a pod. This is the minimum CPU allocated for a pod.
sourcepub fn with_limit_memory<T>(self, quantity: T) -> Self
pub fn with_limit_memory<T>(self, quantity: T) -> Self
Set the overall memory limit for a pod. This is the maximum memory threshold for a pod.
sourcepub fn with_limit_cpu<T>(self, quantity: T) -> Self
pub fn with_limit_cpu<T>(self, quantity: T) -> Self
Set the overall CPU limit for a pod. This is the maximum CPU threshold for a pod.
Trait Implementations§
source§impl Debug for ResourcesBuilder
impl Debug for ResourcesBuilder
source§impl Default for ResourcesBuilder
impl Default for ResourcesBuilder
source§fn default() -> ResourcesBuilder
fn default() -> ResourcesBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResourcesBuilder
impl RefUnwindSafe for ResourcesBuilder
impl Send for ResourcesBuilder
impl Sync for ResourcesBuilder
impl Unpin for ResourcesBuilder
impl UnwindSafe for ResourcesBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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