pub enum AuthenticatedPrincipal {
User(AuthenticatedUser),
RepositoryCredential {
repository_id: u64,
},
}Expand description
Validated GitHub API credential principal without overstating identity.
Variants§
User(AuthenticatedUser)
User credential verified through GET /user.
RepositoryCredential
Installation credential whose accessible-repository list contains the exact requested repository.
Implementations§
Source§impl AuthenticatedPrincipal
impl AuthenticatedPrincipal
Sourcepub fn label(&self) -> &str
pub fn label(&self) -> &str
Stable human-readable principal label for diagnostics and JSON output.
Sourcepub fn user_login(&self) -> Option<&str>
pub fn user_login(&self) -> Option<&str>
Human login only when the API proved a user credential.
Sourcepub const fn repository_id(&self) -> Option<u64>
pub const fn repository_id(&self) -> Option<u64>
Exact repository ID independently proven by an installation credential.
Trait Implementations§
Source§impl Clone for AuthenticatedPrincipal
impl Clone for AuthenticatedPrincipal
Source§impl Debug for AuthenticatedPrincipal
impl Debug for AuthenticatedPrincipal
impl Eq for AuthenticatedPrincipal
Source§impl PartialEq for AuthenticatedPrincipal
impl PartialEq for AuthenticatedPrincipal
impl StructuralPartialEq for AuthenticatedPrincipal
Auto Trait Implementations§
impl Freeze for AuthenticatedPrincipal
impl RefUnwindSafe for AuthenticatedPrincipal
impl Send for AuthenticatedPrincipal
impl Sync for AuthenticatedPrincipal
impl Unpin for AuthenticatedPrincipal
impl UnsafeUnpin for AuthenticatedPrincipal
impl UnwindSafe for AuthenticatedPrincipal
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.