pub struct Permission { /* private fields */ }
Expand description
Struct representing a permission grant for a user or group on a project.
Implementations§
source§impl Permission
impl Permission
pub fn remote(&self) -> Result<Ref<Remote>, ()>
pub fn project(&self) -> Result<Ref<RemoteProject>, ()>
sourcepub fn level(&self) -> CollaborationPermissionLevel
pub fn level(&self) -> CollaborationPermissionLevel
Level of permission
sourcepub fn set_level(&self, level: CollaborationPermissionLevel)
pub fn set_level(&self, level: CollaborationPermissionLevel)
Change the level of the permission You will need to push the group to update the Remote.
sourcepub fn group_name(&self) -> Option<BnString>
pub fn group_name(&self) -> Option<BnString>
Name of affected group
sourcepub fn can_view(&self) -> bool
pub fn can_view(&self) -> bool
If the permission grants the affect user/group the ability to read files in the project
Trait Implementations§
source§impl CoreArrayProvider for Permission
impl CoreArrayProvider for Permission
source§impl PartialEq for Permission
impl PartialEq for Permission
source§impl ToOwned for Permission
impl ToOwned for Permission
source§type Owned = Ref<Permission>
type Owned = Ref<Permission>
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Eq for Permission
Auto Trait Implementations§
impl Freeze for Permission
impl RefUnwindSafe for Permission
impl !Send for Permission
impl !Sync for Permission
impl Unpin for Permission
impl UnwindSafe for Permission
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