pub struct OnePasswordDriver { /* private fields */ }Implementations§
Source§impl OnePasswordDriver
impl OnePasswordDriver
Sourcepub fn new(token: TokenSource) -> OnePasswordDriver
pub fn new(token: TokenSource) -> OnePasswordDriver
op from $ISB_OP_BIN, else the first op on $PATH.
pub fn with_binary(self, op: impl Into<PathBuf>) -> Self
Trait Implementations§
Source§impl Driver for OnePasswordDriver
impl Driver for OnePasswordDriver
Source§fn version(&self, org: &OrgId, name: &str) -> Result<u64>
fn version(&self, org: &OrgId, name: &str) -> Result<u64>
Polling asks 1Password every time; the answer then serves the reads a new version sets off.
Source§fn versions(&self, org: &OrgId, names: &[&str]) -> Vec<Result<u64>> ⓘ
fn versions(&self, org: &OrgId, names: &[&str]) -> Vec<Result<u64>> ⓘ
One op item get per (vault, item), whatever the number of fields
referenced in it.
Source§fn refresh(&self, org: &OrgId, name: &str) -> Result<SecretMeta>
fn refresh(&self, org: &OrgId, name: &str) -> Result<SecretMeta>
Forget what was read lately, so the next look asks 1Password.
Source§fn list(&self, _org: &OrgId) -> Result<Vec<SecretMeta>>
fn list(&self, _org: &OrgId) -> Result<Vec<SecretMeta>>
A vault is not this org’s to enumerate: references are listed where they are used (stacks), not here.
fn inspect(&self, org: &OrgId, name: &str) -> Result<SecretMeta>
Source§fn create(
&self,
org: &OrgId,
name: &str,
_value: &[u8],
_labels: &BTreeMap<String, String>,
) -> Result<SecretMeta>
fn create( &self, org: &OrgId, name: &str, _value: &[u8], _labels: &BTreeMap<String, String>, ) -> Result<SecretMeta>
A new secret at version 1; fails if it exists.
Source§fn set(&self, org: &OrgId, name: &str, _value: &[u8]) -> Result<u64>
fn set(&self, org: &OrgId, name: &str, _value: &[u8]) -> Result<u64>
A new value; returns the new version. Creates the secret if missing.
fn delete(&self, org: &OrgId, name: &str) -> Result<()>
Auto Trait Implementations§
impl !Freeze for OnePasswordDriver
impl !RefUnwindSafe for OnePasswordDriver
impl !UnwindSafe for OnePasswordDriver
impl Send for OnePasswordDriver
impl Sync for OnePasswordDriver
impl Unpin for OnePasswordDriver
impl UnsafeUnpin for OnePasswordDriver
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