pub struct DrainOptionsBuilder { /* private fields */ }
Expand description
Builder for DrainOptions
.
Implementations§
Source§impl DrainOptionsBuilder
impl DrainOptionsBuilder
Sourcepub fn drain_spec(&mut self, value: Option<DrainSpec>) -> &mut Self
pub fn drain_spec(&mut self, value: Option<DrainSpec>) -> &mut Self
DrainSpec contains the drain specification for the node. If non-nil, the node will be marked ineligible and begin/continue draining according to the provided drain spec. If nil, any existing drain operation will be canceled.
Sourcepub fn mark_eligible(&mut self, value: bool) -> &mut Self
pub fn mark_eligible(&mut self, value: bool) -> &mut Self
MarkEligible indicates whether the node should be marked as eligible when canceling a drain operation.
Sourcepub fn meta(&mut self, value: HashMap<String, String>) -> &mut Self
pub fn meta(&mut self, value: HashMap<String, String>) -> &mut Self
Meta is metadata that is persisted in Node.LastDrain about this drain update.
Sourcepub fn build(&self) -> Result<DrainOptions, DrainOptionsBuilderError>
pub fn build(&self) -> Result<DrainOptions, DrainOptionsBuilderError>
Trait Implementations§
Source§impl Clone for DrainOptionsBuilder
impl Clone for DrainOptionsBuilder
Source§fn clone(&self) -> DrainOptionsBuilder
fn clone(&self) -> DrainOptionsBuilder
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 moreAuto Trait Implementations§
impl Freeze for DrainOptionsBuilder
impl RefUnwindSafe for DrainOptionsBuilder
impl Send for DrainOptionsBuilder
impl Sync for DrainOptionsBuilder
impl Unpin for DrainOptionsBuilder
impl UnwindSafe for DrainOptionsBuilder
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