pub enum UnifiedAction {
Read,
Write,
Delete,
Admin,
}Expand description
Unified action model that maps to business permissions. Works consistently across GraphQL, OpenAPI, and SQL servers.
Variants§
Read
Retrieve data without modification (Query, GET, SELECT)
Write
Create or modify data (Mutation create/update, POST/PUT/PATCH, INSERT/UPDATE)
Delete
Remove data (Mutation delete, DELETE, DELETE/TRUNCATE)
Admin
Schema changes, permissions, admin operations (DDL: CREATE/ALTER/DROP)
Implementations§
Source§impl UnifiedAction
impl UnifiedAction
Sourcepub fn from_graphql(operation: &str, mutation_name: Option<&str>) -> Self
pub fn from_graphql(operation: &str, mutation_name: Option<&str>) -> Self
Infer action from GraphQL operation type.
Sourcepub fn from_http_method(method: &str) -> Self
pub fn from_http_method(method: &str) -> Self
Infer action from HTTP method.
Trait Implementations§
Source§impl Clone for UnifiedAction
impl Clone for UnifiedAction
Source§fn clone(&self) -> UnifiedAction
fn clone(&self) -> UnifiedAction
Returns a duplicate 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 moreSource§impl Debug for UnifiedAction
impl Debug for UnifiedAction
Source§impl<'de> Deserialize<'de> for UnifiedAction
impl<'de> Deserialize<'de> for UnifiedAction
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
Source§impl Display for UnifiedAction
impl Display for UnifiedAction
Source§impl PartialEq for UnifiedAction
impl PartialEq for UnifiedAction
Source§impl Serialize for UnifiedAction
impl Serialize for UnifiedAction
impl Copy for UnifiedAction
impl Eq for UnifiedAction
impl StructuralPartialEq for UnifiedAction
Auto Trait Implementations§
impl Freeze for UnifiedAction
impl RefUnwindSafe for UnifiedAction
impl Send for UnifiedAction
impl Sync for UnifiedAction
impl Unpin for UnifiedAction
impl UnsafeUnpin for UnifiedAction
impl UnwindSafe for UnifiedAction
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,
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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.