pub struct Resolver<'a> { /* private fields */ }Expand description
Resolves references with this machine’s providers.
Implementations§
Source§impl<'a> Resolver<'a>
impl<'a> Resolver<'a>
Sourcepub fn new(
env: &'a Env,
keyring: &'a dyn KeyringBackend,
op: &'a OpCli,
memory: Arc<SecretMemory>,
) -> Self
pub fn new( env: &'a Env, keyring: &'a dyn KeyringBackend, op: &'a OpCli, memory: Arc<SecretMemory>, ) -> Self
memory is the process’s SecretMemory (Store::secret_memory).
Sourcepub fn resolve(&self, reference: &SecretRef) -> Result<SecretValue, Resolution>
pub fn resolve(&self, reference: &SecretRef) -> Result<SecretValue, Resolution>
The value of reference. 1Password Environment variables have no
value here: op run --environment hands them to the server process
at start (SPEC 11.5); Surjection never calls op environment read.
Sourcepub fn check(&self, reference: &SecretRef) -> Resolution
pub fn check(&self, reference: &SecretRef) -> Resolution
The status of reference; the value, if fetched, is dropped. May
prompt (1Password approval), so only on an explicit check.
Sourcepub fn set_keyring(
&self,
service: &str,
account: &str,
value: &SecretValue,
) -> Result<(), Resolution>
pub fn set_keyring( &self, service: &str, account: &str, value: &SecretValue, ) -> Result<(), Resolution>
Stores value in the OS keyring and remembers it for the scanner.
Sourcepub fn delete_keyring(
&self,
service: &str,
account: &str,
) -> Result<bool, Resolution>
pub fn delete_keyring( &self, service: &str, account: &str, ) -> Result<bool, Resolution>
Deletes a keyring entry; false when there was none.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Resolver<'a>
impl<'a> !UnwindSafe for Resolver<'a>
impl<'a> Forget for Resolver<'a>
impl<'a> Freeze for Resolver<'a>where
&'a Env: Freeze,
&'a dyn KeyringBackend: Freeze,
&'a OpCli: Freeze,
*const ArcInner<SecretMemory> is !null: Freeze,
PhantomData<ArcInner<SecretMemory>>: Freeze,
impl<'a> Move for Resolver<'a>
impl<'a> Send for Resolver<'a>
impl<'a> Sync for Resolver<'a>
impl<'a> Unpin for Resolver<'a>
impl<'a> UnsafeUnpin for Resolver<'a>where
&'a Env: UnsafeUnpin,
&'a dyn KeyringBackend: UnsafeUnpin,
&'a OpCli: UnsafeUnpin,
*const ArcInner<SecretMemory> is !null: UnsafeUnpin,
PhantomData<ArcInner<SecretMemory>>: UnsafeUnpin,
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