#[repr(u8)]pub enum PushAccess {
Disabled = 0,
Enabled = 1,
Whitelist = 2,
}Expand description
Who may push directly to a protected branch.
Variants§
Disabled = 0
Nobody. Changes arrive through pull requests only.
Enabled = 1
Everyone with write access.
Whitelist = 2
Only the push whitelist.
Implementations§
Source§impl PushAccess
impl PushAccess
Sourcepub const fn from_flags(enable_push: bool, enable_push_whitelist: bool) -> Self
pub const fn from_flags(enable_push: bool, enable_push_whitelist: bool) -> Self
Read the access from Forgejo’s two wire flags.
Sourcepub const fn enables_push(self) -> bool
pub const fn enables_push(self) -> bool
Forgejo’s enable_push flag.
Sourcepub const fn restricts_to_whitelist(self) -> bool
pub const fn restricts_to_whitelist(self) -> bool
Forgejo’s enable_push_whitelist flag.
Trait Implementations§
Source§impl Clone for PushAccess
impl Clone for PushAccess
Source§fn clone(&self) -> PushAccess
fn clone(&self) -> PushAccess
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 moreimpl Copy for PushAccess
Source§impl Debug for PushAccess
impl Debug for PushAccess
impl Eq for PushAccess
Source§impl<'ʄ> Facet<'ʄ> for PushAccess
impl<'ʄ> Facet<'ʄ> for PushAccess
Source§impl PartialEq for PushAccess
impl PartialEq for PushAccess
impl StructuralPartialEq for PushAccess
Auto Trait Implementations§
impl Freeze for PushAccess
impl RefUnwindSafe for PushAccess
impl Send for PushAccess
impl Sync for PushAccess
impl Unpin for PushAccess
impl UnsafeUnpin for PushAccess
impl UnwindSafe for PushAccess
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.