pub struct IpcClient { /* private fields */ }Expand description
IPC client for daemon communication
Implementations§
Source§impl IpcClient
impl IpcClient
Sourcepub fn new_with_token(socket_path: PathBuf, auth_token: String) -> Self
pub fn new_with_token(socket_path: PathBuf, auth_token: String) -> Self
Create a new IPC client with an explicit auth token.
Sourcepub fn new_for_cli(
socket_path: PathBuf,
client_token: Option<String>,
) -> Result<Self>
pub fn new_for_cli( socket_path: PathBuf, client_token: Option<String>, ) -> Result<Self>
CLI client carrying a per-client grant token for external secret access.
Sourcepub fn with_context(
self,
client_token: Option<String>,
origin: Option<Origin>,
) -> Self
pub fn with_context( self, client_token: Option<String>, origin: Option<Origin>, ) -> Self
Override the per-client grant token and origin label. Intended for embedders that construct the daemon token explicitly (tests, hosts).
Sourcepub fn new_for_native_host(socket_path: PathBuf) -> Result<Self>
pub fn new_for_native_host(socket_path: PathBuf) -> Result<Self>
Browser native-messaging host client.
Sourcepub async fn send(&self, msg: IpcMessage) -> Result<IpcMessage>
pub async fn send(&self, msg: IpcMessage) -> Result<IpcMessage>
Send a message and wait for response
Auto Trait Implementations§
impl Freeze for IpcClient
impl RefUnwindSafe for IpcClient
impl Send for IpcClient
impl Sync for IpcClient
impl Unpin for IpcClient
impl UnsafeUnpin for IpcClient
impl UnwindSafe for IpcClient
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