pub struct Client { /* private fields */ }Expand description
One CLI ↔ daemon connection.
Implementations§
Source§impl Client
impl Client
Sourcepub fn connect(socket: impl Into<PathBuf>) -> Result<Self>
pub fn connect(socket: impl Into<PathBuf>) -> Result<Self>
Connect to the daemon at socket. Returns the connected client
or an error if the socket is missing / unreachable.
Sourcepub fn connect_with_retry(
socket: impl AsRef<Path>,
timeout: Duration,
) -> Result<Self>
pub fn connect_with_retry( socket: impl AsRef<Path>, timeout: Duration, ) -> Result<Self>
Connect, retrying for timeout if the socket is missing —
useful immediately after spawning the daemon.
pub fn socket(&self) -> &Path
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl UnwindSafe for Client
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