pub enum GhAuthentication {
EnvironmentToken {
variable: TokenEnvironmentVariable,
},
ConfigDirectory(PathBuf),
}Expand description
Explicit GitHub CLI authentication source.
Variants§
EnvironmentToken
Read exactly one named token variable and use an isolated config dir.
Fields
§
variable: TokenEnvironmentVariableAllowlisted variable name; never its value.
ConfigDirectory(PathBuf)
Use exactly one canonical gh configuration directory.
Implementations§
Source§impl GhAuthentication
impl GhAuthentication
Sourcepub const fn environment_token(variable: TokenEnvironmentVariable) -> Self
pub const fn environment_token(variable: TokenEnvironmentVariable) -> Self
Configure exact environment-token authentication. The token itself is not read until request execution.
Sourcepub fn config_directory(
directory: impl AsRef<Path>,
) -> Result<Self, TransportConfigError>
pub fn config_directory( directory: impl AsRef<Path>, ) -> Result<Self, TransportConfigError>
Configure authentication through one exact gh config directory.
§Errors
Rejects a missing, relative, non-directory, or symlink-final path.
Trait Implementations§
Source§impl Clone for GhAuthentication
impl Clone for GhAuthentication
Source§impl Debug for GhAuthentication
impl Debug for GhAuthentication
impl Eq for GhAuthentication
Source§impl PartialEq for GhAuthentication
impl PartialEq for GhAuthentication
impl StructuralPartialEq for GhAuthentication
Auto Trait Implementations§
impl Freeze for GhAuthentication
impl RefUnwindSafe for GhAuthentication
impl Send for GhAuthentication
impl Sync for GhAuthentication
impl Unpin for GhAuthentication
impl UnsafeUnpin for GhAuthentication
impl UnwindSafe for GhAuthentication
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.