pub trait Credential {
    fn name(&self) -> &'static str;
    fn get(&self, index_url: &str) -> Result<String, Error>;
    fn store(
        &self,
        index_url: &str,
        token: &str,
        name: Option<&str>
    ) -> Result<(), Error>; fn erase(&self, index_url: &str) -> Result<(), Error>; }

Required Methods§

Returns the name of this credential process.

Retrieves a token for the given registry.

Stores the given token for the given registry.

Removes the token for the given registry.

If the user is not logged in, this should print a message to stderr if possible indicating that the user is not currently logged in, and return Ok.

Implementors§