#[non_exhaustive]pub struct RoleMap {
pub own: ForgeRole,
pub maintain: ForgeRole,
pub commit: ForgeRole,
}Expand description
Which forge role each repository tier asks for, before the forge’s ladder is applied (§4.2’s “GitHub projection (org)” column is the default).
This is the community hook of §5.8 layer 3: a namespace may override the
map (maintain → admin on Forgejo, or committers get write on a repo
that opts in) without code.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.own: ForgeRoleRole for git.repo.own.
maintain: ForgeRoleRole for git.repo.maintain.
commit: ForgeRoleRole for git.commit.sign. None by default: committers contribute
through fork PRs, and the required check — not a forge role — decides
whether their commits land.
Implementations§
Source§impl RoleMap
impl RoleMap
Sourcepub fn with_committer_write() -> Self
pub fn with_committer_write() -> Self
The default map with committers given write — for a repository that
opts in to branch-based contribution.
Sourcepub fn requested(&self, rights: EffectiveRights) -> ForgeRole
pub fn requested(&self, rights: EffectiveRights) -> ForgeRole
The role the rights ask for, before any ladder is applied.
Trait Implementations§
impl Copy for RoleMap
Source§impl<'de> Deserialize<'de> for RoleMap
impl<'de> Deserialize<'de> for RoleMap
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
impl Eq for RoleMap
impl StructuralPartialEq for RoleMap
Auto Trait Implementations§
impl Freeze for RoleMap
impl RefUnwindSafe for RoleMap
impl Send for RoleMap
impl Sync for RoleMap
impl Unpin for RoleMap
impl UnsafeUnpin for RoleMap
impl UnwindSafe for RoleMap
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