pub struct ProviderClient<R, W> { /* private fields */ }Expand description
Async client for communicating with a key provider process.
Thread-safe via an interior Mutex — multiple tasks can share a single client,
but requests are serialized (one at a time on the wire).
Implementations§
Source§impl<R, W> ProviderClient<R, W>
impl<R, W> ProviderClient<R, W>
Sourcepub fn new(reader: R, writer: W) -> Self
pub fn new(reader: R, writer: W) -> Self
Create a new client from an AsyncRead (provider’s stdout) and AsyncWrite (provider’s stdin).
Sourcepub async fn initialize(&self) -> Result<InitializeResult, Error>
pub async fn initialize(&self) -> Result<InitializeResult, Error>
Send an initialize request and return the provider’s certificates.
May be called multiple times to reload certificates from a running provider.
Auto Trait Implementations§
impl<R, W> !Freeze for ProviderClient<R, W>
impl<R, W> !RefUnwindSafe for ProviderClient<R, W>
impl<R, W> Send for ProviderClient<R, W>
impl<R, W> Sync for ProviderClient<R, W>
impl<R, W> Unpin for ProviderClient<R, W>
impl<R, W> UnsafeUnpin for ProviderClient<R, W>where
R: UnsafeUnpin,
W: UnsafeUnpin,
impl<R, W> !UnwindSafe for ProviderClient<R, W>
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