pub struct Client { /* private fields */ }Expand description
A client for the control plane.
Cloning is cheap and shares everything: the connection pool, the token, and — the point of sharing it — the concurrency limit. Two clients would be two limits, which is one limit too many.
Implementations§
Source§impl Client
impl Client
pub fn new(config: ClientConfig) -> Result<Self, ApiError>
Sourcepub fn tailnet_path(&self, tailnet: Option<&str>, rest: &str) -> String
pub fn tailnet_path(&self, tailnet: Option<&str>, rest: &str) -> String
The path of a tailnet-scoped resource, for tailnet or the default.
Every tailnet path is built here so that a tailnet name carrying a slash cannot reach into a path it was not given.
pub fn get(&self, path: impl Into<String>) -> RequestBuilder<'_>
pub fn post(&self, path: impl Into<String>) -> RequestBuilder<'_>
pub fn put(&self, path: impl Into<String>) -> RequestBuilder<'_>
pub fn patch(&self, path: impl Into<String>) -> RequestBuilder<'_>
pub fn delete(&self, path: impl Into<String>) -> RequestBuilder<'_>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin 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