pub struct WalrusClient { /* private fields */ }Expand description
Unix domain socket client for the walrus daemon.
Holds configuration. Call WalrusClient::connect to establish a
connection.
Implementations§
Source§impl WalrusClient
impl WalrusClient
Sourcepub fn new(config: ClientConfig) -> Self
pub fn new(config: ClientConfig) -> Self
Create a new client with the given configuration.
Sourcepub fn config(&self) -> &ClientConfig
pub fn config(&self) -> &ClientConfig
Access the client configuration.
Sourcepub fn socket_path(self, path: impl Into<PathBuf>) -> Self
pub fn socket_path(self, path: impl Into<PathBuf>) -> Self
Set the daemon socket path.
Sourcepub async fn connect(&self) -> Result<Connection>
pub async fn connect(&self) -> Result<Connection>
Connect to the daemon and return a Connection.
Auto Trait Implementations§
impl Freeze for WalrusClient
impl RefUnwindSafe for WalrusClient
impl Send for WalrusClient
impl Sync for WalrusClient
impl Unpin for WalrusClient
impl UnsafeUnpin for WalrusClient
impl UnwindSafe for WalrusClient
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