#[non_exhaustive]pub enum PodMethod {
Get,
Head,
Put,
Delete,
}Expand description
A pod operation a manifest may allow: GET, HEAD, PUT or DELETE.
§Examples
use stratum_node_core::PodMethod;
assert_eq!("PUT".parse::<PodMethod>()?, PodMethod::Put);
assert!(PodMethod::Delete.needs_write());
assert!(!PodMethod::Head.needs_write());
assert!("POST".parse::<PodMethod>().is_err());
assert_eq!(serde_json::to_string(&PodMethod::Get)?, "\"GET\"");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
impl Copy for PodMethod
Source§impl<'de> Deserialize<'de> for PodMethod
impl<'de> Deserialize<'de> for PodMethod
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
impl Eq for PodMethod
Source§impl Ord for PodMethod
impl Ord for PodMethod
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for PodMethod
impl PartialOrd for PodMethod
impl StructuralPartialEq for PodMethod
Auto Trait Implementations§
impl Forget for PodMethod
impl Freeze for PodMethod
impl Move for PodMethod
impl RefUnwindSafe for PodMethod
impl Send for PodMethod
impl Sync for PodMethod
impl Unpin for PodMethod
impl UnsafeUnpin for PodMethod
impl UnwindSafe for PodMethod
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