Skip to main content

CredentialSource

Trait CredentialSource 

Source
pub trait CredentialSource: Send + Sync {
    // Required method
    fn credentials_for(
        &self,
        scheme: EncryptionScheme,
        target: &str,
    ) -> Vec<Credential>;
}
Expand description

Supplies credentials at resolve time. Injected into the resolve call, kept out of the serialized address, so a Locator is safe to persist and re-open (the caller re-supplies credentials on re-open).

Required Methods§

Source

fn credentials_for( &self, scheme: EncryptionScheme, target: &str, ) -> Vec<Credential>

Offer credentials for a target (a volume GUID / label / scheme name). An empty slice means “none available” — the layer then errors crate::error::VfsError::NeedCredentials rather than guessing.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§