pub struct InMemorySecretResolver { /* private fields */ }Expand description
Deterministic in-memory SecretResolver for tests and the local-dev
default. Constructed from a (service, account) -> secret map or, when no
map is provided, refuses every lookup so missing-secret behaviour is
exercised by tests rather than masked.
Implementations§
Source§impl InMemorySecretResolver
impl InMemorySecretResolver
Sourcepub fn new() -> Self
pub fn new() -> Self
Cross-host surface: integration tests in
tests/foundation_profiles.rs and external-host test harnesses
build an empty InMemorySecretResolver and then .with_secret(...).
Sourcepub fn with_secret(
self,
service: impl Into<String>,
account: impl Into<String>,
secret: impl Into<String>,
) -> Self
pub fn with_secret( self, service: impl Into<String>, account: impl Into<String>, secret: impl Into<String>, ) -> Self
Register a (service, account) -> secret mapping. Tests use this to
shape Keychain behaviour for the assertion.
Cross-host surface: integration tests in
tests/foundation_profiles.rs.
Trait Implementations§
Source§impl Clone for InMemorySecretResolver
impl Clone for InMemorySecretResolver
Source§fn clone(&self) -> InMemorySecretResolver
fn clone(&self) -> InMemorySecretResolver
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 moreSource§impl Debug for InMemorySecretResolver
impl Debug for InMemorySecretResolver
Source§impl Default for InMemorySecretResolver
impl Default for InMemorySecretResolver
Source§fn default() -> InMemorySecretResolver
fn default() -> InMemorySecretResolver
Returns the “default value” for a type. Read more
Source§impl SecretResolver for InMemorySecretResolver
impl SecretResolver for InMemorySecretResolver
Source§fn resolve(&self, locator: &SecretLocator) -> Result<String, FoundationError>
fn resolve(&self, locator: &SecretLocator) -> Result<String, FoundationError>
Fetch the secret bytes for a validated locator. Returns a structured
FoundationError::SecretUnavailable so the caller can report why
the profile cannot run and fall through to the next resolution step.Auto Trait Implementations§
impl Freeze for InMemorySecretResolver
impl RefUnwindSafe for InMemorySecretResolver
impl Send for InMemorySecretResolver
impl Sync for InMemorySecretResolver
impl Unpin for InMemorySecretResolver
impl UnsafeUnpin for InMemorySecretResolver
impl UnwindSafe for InMemorySecretResolver
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