pub struct StaticAuthProvider { /* private fields */ }Expand description
Provider that always returns a fixed TransportAuth.
Use for explicitly configured credentials (an SSH key, the SSH agent, or a caller-held token).
Implementations§
Source§impl StaticAuthProvider
impl StaticAuthProvider
Sourcepub fn new(auth: TransportAuth) -> Self
pub fn new(auth: TransportAuth) -> Self
Create a provider that always yields auth.
Trait Implementations§
Source§impl AuthProvider for StaticAuthProvider
impl AuthProvider for StaticAuthProvider
Source§fn transport_auth(
&self,
_remote: Option<&str>,
) -> AppResult<Option<TransportAuth>>
fn transport_auth( &self, _remote: Option<&str>, ) -> AppResult<Option<TransportAuth>>
Resolves transport auth for an optional remote name. Read more
Source§fn signing_config(&self) -> AppResult<Option<SigningConfig>>
fn signing_config(&self) -> AppResult<Option<SigningConfig>>
Resolves signing configuration for commit-producing operations. Read more
Source§impl Clone for StaticAuthProvider
impl Clone for StaticAuthProvider
Source§fn clone(&self) -> StaticAuthProvider
fn clone(&self) -> StaticAuthProvider
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 moreAuto Trait Implementations§
impl Freeze for StaticAuthProvider
impl RefUnwindSafe for StaticAuthProvider
impl Send for StaticAuthProvider
impl Sync for StaticAuthProvider
impl Unpin for StaticAuthProvider
impl UnsafeUnpin for StaticAuthProvider
impl UnwindSafe for StaticAuthProvider
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