pub struct ClientConfig { /* private fields */ }Expand description
Connection configuration for crate::Client.
This epic only supports a local Unix-socket target. A remote(url)
constructor for the mutual-TLS transport is intentionally absent - see
the crate root doc comment.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn unix_socket(path: impl Into<PathBuf>) -> Self
pub fn unix_socket(path: impl Into<PathBuf>) -> Self
Configure a client that connects to the Incus daemon over the given
Unix domain socket path (e.g. /var/lib/incus/unix.socket).
Defaults to a 30-second per-request timeout - override it with
ClientConfig::with_request_timeout.
Sourcepub fn with_request_timeout(self, timeout: Option<Duration>) -> Self
pub fn with_request_timeout(self, timeout: Option<Duration>) -> Self
Overrides the default 30-second per-request timeout. Pass None to
disable it and wait indefinitely.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientConfig
impl Debug for ClientConfig
Source§impl PartialEq for ClientConfig
impl PartialEq for ClientConfig
Source§fn eq(&self, other: &ClientConfig) -> bool
fn eq(&self, other: &ClientConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ClientConfig
impl StructuralPartialEq for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.