pub enum OperationClass {
Task,
Websocket,
Token,
Other(String),
}Expand description
#[non_exhaustive]-equivalent: an unrecognized class value from a
future Incus version becomes Other(<the raw string>) rather than
failing deserialization outright (which is what a plain
#[derive(Serialize, Deserialize)] enum would do here) - consistent
with Error’s own #[non_exhaustive] forward-compatibility stance.
Serialize/Deserialize are implemented by hand rather than derived so
Other round-trips back to its original wire string exactly, instead of
serializing as {"Other": "..."}.
Variants§
Trait Implementations§
Source§impl Clone for OperationClass
impl Clone for OperationClass
Source§fn clone(&self) -> OperationClass
fn clone(&self) -> OperationClass
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OperationClass
impl Debug for OperationClass
Source§impl<'de> Deserialize<'de> for OperationClass
impl<'de> Deserialize<'de> for OperationClass
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OperationClass
impl PartialEq for OperationClass
Source§fn eq(&self, other: &OperationClass) -> bool
fn eq(&self, other: &OperationClass) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OperationClass
impl Serialize for OperationClass
impl Eq for OperationClass
impl StructuralPartialEq for OperationClass
Auto Trait Implementations§
impl Freeze for OperationClass
impl RefUnwindSafe for OperationClass
impl Send for OperationClass
impl Sync for OperationClass
impl Unpin for OperationClass
impl UnsafeUnpin for OperationClass
impl UnwindSafe for OperationClass
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,
§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
Compare self to
key and return true if they are equal.