Enum google_api_proto::google::devtools::remoteworkers::v1test2::LeaseState
source · #[repr(i32)]pub enum LeaseState {
Unspecified = 0,
Pending = 1,
Active = 2,
Completed = 4,
Cancelled = 5,
}
Expand description
The state of the lease. All leases start in the PENDING state. A bot can change PENDING to ACTIVE or (in the case of an error) COMPLETED, or from ACTIVE to COMPLETED. The server can change PENDING or ACTIVE to CANCELLED if it wants the bot to release its resources - for example, if the bot needs to be quarantined (it’s producing bad output) or a cell needs to be drained.
Variants§
Unspecified = 0
Default value; do not use.
Pending = 1
Pending: the server expects the bot to accept this lease. This may only be set by the server.
Active = 2
Active: the bot has accepted this lease. This may only be set by the bot.
Completed = 4
Completed: the bot is no longer leased. This may only be set by the bot, and the status field must be populated iff the state is COMPLETED.
Cancelled = 5
Cancelled: The bot should immediately release all resources associated with the lease. This may only be set by the server.
Implementations§
source§impl LeaseState
impl LeaseState
source§impl LeaseState
impl LeaseState
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for LeaseState
impl Clone for LeaseState
source§fn clone(&self) -> LeaseState
fn clone(&self) -> LeaseState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LeaseState
impl Debug for LeaseState
source§impl Default for LeaseState
impl Default for LeaseState
source§fn default() -> LeaseState
fn default() -> LeaseState
source§impl From<LeaseState> for i32
impl From<LeaseState> for i32
source§fn from(value: LeaseState) -> i32
fn from(value: LeaseState) -> i32
source§impl Hash for LeaseState
impl Hash for LeaseState
source§impl Ord for LeaseState
impl Ord for LeaseState
source§fn cmp(&self, other: &LeaseState) -> Ordering
fn cmp(&self, other: &LeaseState) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for LeaseState
impl PartialEq for LeaseState
source§fn eq(&self, other: &LeaseState) -> bool
fn eq(&self, other: &LeaseState) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LeaseState
impl PartialOrd for LeaseState
source§fn partial_cmp(&self, other: &LeaseState) -> Option<Ordering>
fn partial_cmp(&self, other: &LeaseState) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for LeaseState
impl TryFrom<i32> for LeaseState
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<LeaseState, UnknownEnumValue>
fn try_from(value: i32) -> Result<LeaseState, UnknownEnumValue>
impl Copy for LeaseState
impl Eq for LeaseState
impl StructuralPartialEq for LeaseState
Auto Trait Implementations§
impl Freeze for LeaseState
impl RefUnwindSafe for LeaseState
impl Send for LeaseState
impl Sync for LeaseState
impl Unpin for LeaseState
impl UnwindSafe for LeaseState
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request