#[repr(i32)]pub enum HostedRole {
Unspecified = 0,
Reader = 1,
Developer = 2,
Maintainer = 3,
Admin = 4,
Owner = 5,
}Expand description
Five-level role grants on hosted namespaces and repositories. Used
wherever a role appears on the wire — HostedGrant.role,
Invitation.role, ApprovalGroupMember.required_role,
ThreadPolicy.required_role, etc.
Variants§
Implementations§
Source§impl HostedRole
impl HostedRole
Source§impl HostedRole
impl HostedRole
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for HostedRole
impl Clone for HostedRole
Source§fn clone(&self) -> HostedRole
fn clone(&self) -> HostedRole
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 HostedRole
Source§impl Debug for HostedRole
impl Debug for HostedRole
Source§impl Default for HostedRole
impl Default for HostedRole
Source§fn default() -> HostedRole
fn default() -> HostedRole
Returns the “default value” for a type. Read more
impl Eq for HostedRole
Source§impl From<HostedRole> for i32
impl From<HostedRole> for i32
Source§fn from(value: HostedRole) -> i32
fn from(value: HostedRole) -> i32
Converts to this type from the input type.
Source§impl Hash for HostedRole
impl Hash for HostedRole
Source§impl Ord for HostedRole
impl Ord for HostedRole
Source§fn cmp(&self, other: &HostedRole) -> Ordering
fn cmp(&self, other: &HostedRole) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HostedRole
impl PartialEq for HostedRole
Source§impl PartialOrd for HostedRole
impl PartialOrd for HostedRole
impl StructuralPartialEq for HostedRole
Source§impl TryFrom<i32> for HostedRole
impl TryFrom<i32> for HostedRole
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<HostedRole, UnknownEnumValue>
fn try_from(value: i32) -> Result<HostedRole, UnknownEnumValue>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for HostedRole
impl RefUnwindSafe for HostedRole
impl Send for HostedRole
impl Sync for HostedRole
impl Unpin for HostedRole
impl UnsafeUnpin for HostedRole
impl UnwindSafe for HostedRole
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