pub trait CredentialProvider {
// Required methods
fn fill(&self, input: &Credential) -> Result<Credential>;
fn approve(&self, cred: &Credential) -> Result<()>;
fn reject(&self, cred: &Credential) -> Result<()>;
}Expand description
The pluggable credential seam an embedder implements (or wraps).
All three methods take a (partial) Credential describing the target and
return a result; transports call fill before a
request and approve /
reject after, mirroring Git’s
credential_fill / credential_approve / credential_reject.
Required Methods§
Sourcefn fill(&self, input: &Credential) -> Result<Credential>
fn fill(&self, input: &Credential) -> Result<Credential>
Fill in missing fields (typically username/password) for input,
returning a more-complete Credential. Implementations that cannot
supply a usable credential should return a typed Error rather than
block on interactive input.
Sourcefn approve(&self, cred: &Credential) -> Result<()>
fn approve(&self, cred: &Credential) -> Result<()>
Mark cred as known-good (helpers store it).
Sourcefn reject(&self, cred: &Credential) -> Result<()>
fn reject(&self, cred: &Credential) -> Result<()>
Mark cred as known-bad (helpers erase it).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".