pub enum Action {
Read,
Write,
Delete,
Destructive,
}Expand description
The derived action attribute of a request, fixed family-wide.
Each service’s guard derives one Action per request from the HTTP
method plus its documented destructive named POSTs:
| Action | Derivation |
|---|---|
Read | GET / HEAD / OPTIONS |
Write | POST / PUT / PATCH — except destructive named POSTs |
Delete | DELETE |
Destructive | the crate’s destructive named POSTs (record merge, batch deduplicate, bulk import) |
Delete implies Destructive for rule matching: a rule listing
the destructive action matches both Delete and Destructive
requests, while a rule listing delete matches only Delete.
Destructive named POSTs are deliberately not Write.
Variants§
Read
GET / HEAD / OPTIONS — default-allowed when no rule matches.
Write
POST / PUT / PATCH, excluding destructive named POSTs.
Delete
DELETE. Matched by both delete and destructive rule actions.
Destructive
A destructive named POST (merge / deduplicate / import).
Trait Implementations§
impl Copy for Action
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
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 Action
impl StructuralPartialEq for Action
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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