pub struct AccessState<P> {
pub teams: BTreeMap<TeamName, Observed<P>>,
pub inherited_teams: BTreeSet<TeamName>,
pub organization_teams: BTreeMap<TeamName, Observed<P>>,
pub collaborators: BTreeMap<UserName, Observed<P>>,
pub caller: Option<Caller>,
}Expand description
The team and collaborator grants a forge reports for one repository.
P is the forge’s permission type. Every field is empty unless access is
managed.
Fields§
§teams: BTreeMap<TeamName, Observed<P>>Direct repository team grants.
inherited_teams: BTreeSet<TeamName>Teams that reach the repository through an organization or an enterprise and cannot be removed from it.
organization_teams: BTreeMap<TeamName, Observed<P>>Organization teams available for assignment.
collaborators: BTreeMap<UserName, Observed<P>>Direct collaborators.
caller: Option<Caller>The authenticated account. None unless access is managed.
Implementations§
Source§impl<P> AccessState<P>
impl<P> AccessState<P>
Sourcepub const fn grants(&self, scope: PermissionScope) -> Grants<'_, P>
pub const fn grants(&self, scope: PermissionScope) -> Grants<'_, P>
The team grants as the planner reads them.
Trait Implementations§
Source§impl<P: Clone> Clone for AccessState<P>
impl<P: Clone> Clone for AccessState<P>
Source§fn clone(&self) -> AccessState<P>
fn clone(&self) -> AccessState<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Debug> Debug for AccessState<P>
impl<P: Debug> Debug for AccessState<P>
Auto Trait Implementations§
impl<P> Freeze for AccessState<P>
impl<P> RefUnwindSafe for AccessState<P>where
BTreeMap<TeamName, Observed<P>>: RefUnwindSafe,
BTreeMap<UserName, Observed<P>>: RefUnwindSafe,
impl<P> Send for AccessState<P>
impl<P> Sync for AccessState<P>
impl<P> Unpin for AccessState<P>
impl<P> UnsafeUnpin for AccessState<P>
impl<P> UnwindSafe for AccessState<P>
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