pub enum GraphRole {
Reader,
Admin,
}Expand description
Role required for graph operations.
Variants§
Implementations§
Source§impl GraphRole
impl GraphRole
Sourcepub const fn satisfies(self, required: Self) -> Result<(), PostgresGraphError>
pub const fn satisfies(self, required: Self) -> Result<(), PostgresGraphError>
Returns Ok when self satisfies required.
§Errors
Returns PostgresGraphError::AccessDenied when the role is insufficient.
§Performance
This method is O(1).
Sourcepub const fn require(self, required: Self) -> Result<(), PostgresGraphError>
pub const fn require(self, required: Self) -> Result<(), PostgresGraphError>
Returns Ok when self satisfies required.
§Errors
Returns PostgresGraphError::AccessDenied when the role is insufficient.
§Performance
This method is O(1).
Trait Implementations§
impl Copy for GraphRole
impl Eq for GraphRole
impl StructuralPartialEq for GraphRole
Auto Trait Implementations§
impl Freeze for GraphRole
impl RefUnwindSafe for GraphRole
impl Send for GraphRole
impl Sync for GraphRole
impl Unpin for GraphRole
impl UnsafeUnpin for GraphRole
impl UnwindSafe for GraphRole
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