pub struct PermissionGrant {
pub principal: Principal,
pub permissions: Permissions,
}Available on crate feature
signatures only.Expand description
A permission grant for a specific principal.
Fields§
§principal: PrincipalThe principal receiving the permissions.
permissions: PermissionsThe granted permissions.
Implementations§
Source§impl PermissionGrant
impl PermissionGrant
Sourcepub fn new(principal: Principal, permissions: Permissions) -> Self
pub fn new(principal: Principal, permissions: Permissions) -> Self
Create a new permission grant.
Sourcepub fn full_access_for_user(email: impl Into<String>) -> Self
pub fn full_access_for_user(email: impl Into<String>) -> Self
Grant full access to a user.
Sourcepub fn reviewer_for_user(email: impl Into<String>) -> Self
pub fn reviewer_for_user(email: impl Into<String>) -> Self
Grant reviewer access to a user.
Sourcepub fn editor_for_user(email: impl Into<String>) -> Self
pub fn editor_for_user(email: impl Into<String>) -> Self
Grant editor access to a user.
Trait Implementations§
Source§impl Clone for PermissionGrant
impl Clone for PermissionGrant
Source§fn clone(&self) -> PermissionGrant
fn clone(&self) -> PermissionGrant
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 PermissionGrant
impl Debug for PermissionGrant
Source§impl<'de> Deserialize<'de> for PermissionGrant
impl<'de> Deserialize<'de> for PermissionGrant
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 PartialEq for PermissionGrant
impl PartialEq for PermissionGrant
Source§impl Serialize for PermissionGrant
impl Serialize for PermissionGrant
impl Eq for PermissionGrant
impl StructuralPartialEq for PermissionGrant
Auto Trait Implementations§
impl Freeze for PermissionGrant
impl RefUnwindSafe for PermissionGrant
impl Send for PermissionGrant
impl Sync for PermissionGrant
impl Unpin for PermissionGrant
impl UnsafeUnpin for PermissionGrant
impl UnwindSafe for PermissionGrant
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§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.