Struct nanocld_client::NanocldClient

source ·
pub struct NanocldClient {
    pub url: String,
    pub version: String,
    pub unix_socket: Option<String>,
    pub ssl: Option<SslConfig>,
}

Fields§

§url: String§version: String§unix_socket: Option<String>§ssl: Option<SslConfig>

Implementations§

source§

impl NanocldClient

source

pub fn connect_with_unix_default() -> Self

source

pub fn connect_to(opts: &ConnectOpts) -> IoResult<Self>

source

pub fn set_version(&mut self, version: &str)

source

pub fn connect_with_unix_version(version: &str) -> Self

source

pub async fn send_get<Q>( &self, url: &str, query: Option<Q>, ) -> Result<ClientResponse, HttpClientError>
where Q: Serialize,

source

pub fn convert_query<Q>( query: Option<&Q>, ) -> Result<GenericListQueryNsp, HttpClientError>

source

pub async fn send_post<Q, B>( &self, url: &str, body: Option<B>, query: Option<Q>, ) -> Result<ClientResponse, HttpClientError>
where B: Serialize, Q: Serialize,

source

pub async fn send_post_stream<S, Q, E>( &self, url: &str, stream: S, query: Option<Q>, ) -> Result<ClientResponse, HttpClientError>
where S: Stream<Item = Result<Bytes, E>> + Unpin + 'static, Q: Serialize, E: Error + 'static,

source

pub async fn send_delete<Q>( &self, url: &str, query: Option<Q>, ) -> Result<ClientResponse, HttpClientError>
where Q: Serialize,

source

pub async fn send_patch<B, Q>( &self, url: &str, body: Option<B>, query: Option<Q>, ) -> Result<ClientResponse, HttpClientError>
where B: Serialize, Q: Serialize,

source

pub async fn send_head<Q>( &self, url: &str, query: Option<Q>, ) -> Result<ClientResponse, HttpClientError>
where Q: Serialize,

source

pub async fn send_put<B, Q>( &self, url: &str, body: Option<B>, query: Option<Q>, ) -> Result<ClientResponse, HttpClientError>
where B: Serialize, Q: Serialize,

source

pub async fn res_json<R>(res: ClientResponse) -> Result<R, HttpClientError>
where R: DeserializeOwned + Send + 'static,

source

pub async fn res_stream<R>( res: ClientResponse, ) -> Receiver<Result<R, HttpError>>
where R: DeserializeOwned + Send + 'static,

source§

impl NanocldClient

source

pub async fn list_namespace( &self, query: Option<&GenericFilter>, ) -> HttpClientResult<Vec<NamespaceSummary>>

List all namespaces from the system

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_namespace().await;
source

pub async fn create_namespace(&self, name: &str) -> HttpClientResult<Namespace>

Create a namespace by it’s name

source

pub async fn inspect_namespace( &self, name: &str, ) -> HttpClientResult<NamespaceInspect>

Inspect a namespace by it’s name to get detailed information about it.

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.inspect_namespace("my-namespace").await;
source

pub async fn delete_namespace(&self, name: &str) -> HttpClientResult<()>

Delete a namespace by it’s name

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.delete_namespace("my-namespace").await;
source§

impl NanocldClient

source

pub async fn create_cargo( &self, item: &CargoSpecPartial, namespace: Option<&str>, ) -> HttpClientResult<Cargo>

Create a new cargo in the system Note that the cargo is not started by default

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let new_cargo = CargoSpecPartial {
 name: String::from("my-cargo"),
 container: bollard_next::container::Config {
   image: Some(String::from("alpine"))
   ..Default::default()
  }
};
let res = client.create_cargo(new_cargo, None).await;
source

pub async fn delete_cargo( &self, name: &str, query: Option<&CargoDeleteQuery>, ) -> HttpClientResult<()>

Delete a cargo by it’s name and namespace

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.delete_cargo("my-cargo", None).await;
source

pub async fn inspect_cargo( &self, name: &str, namespace: Option<&str>, ) -> HttpClientResult<CargoInspect>

Inspect a cargo by it’s name to get more information about it

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.inspect_cargo("my-cargo", None).await;
source

pub async fn list_cargo( &self, query: Option<&GenericFilterNsp>, ) -> HttpClientResult<Vec<CargoSummary>>

List all cargoes in a namespace

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let cargoes = client.list_cargoes(None).await.unwrap();
source

pub async fn patch_cargo( &self, name: &str, spec: &CargoSpecUpdate, namespace: Option<&str>, ) -> HttpClientResult<()>

Patch a cargo by it’s name This will update the cargo’s spec by merging current spec with new spec and creating an history entry

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let cargo_spec = CargoSpecPatch {
  name: "my-cargo-renamed".into(),
};
client.patch_cargo("my-cargo", cargo, None).await.unwrap();
source

pub async fn put_cargo( &self, name: &str, spec: &CargoSpecPartial, namespace: Option<&str>, ) -> HttpClientResult<()>

Put a cargo by it’s name It will create a new cargo spec and store old one in history

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let cargo_spec = CargoSpecPartial {
  name: "my-cargo-renamed".into(),
};
client.put_cargo("my-cargo", &cargo, None).await.unwrap();
source

pub async fn list_history_cargo( &self, name: &str, namespace: Option<&str>, ) -> HttpClientResult<Vec<CargoSpec>>

List cargo histories

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let histories = client.list_history("my-cargo", None).await.unwrap();
source

pub async fn revert_cargo( &self, name: &str, id: &str, namespace: Option<&str>, ) -> HttpClientResult<Cargo>

Revert a cargo to a specific history

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let cargo = client.revert_cargo("my-cargo", "my-history-id", None).await.unwrap();
source

pub async fn list_cargo_instance( &self, name: &str, namespace: Option<&str>, ) -> HttpClientResult<Vec<ContainerSummary>>

List all the instances of a cargo by it’s name and namespace

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_cargo_instance("my-cargo", None).await;
source§

impl NanocldClient

source

pub async fn create_exec( &self, name: &str, exec: &CreateExecOptions, namespace: Option<&str>, ) -> HttpClientResult<CreateExecResults>

Create exec command inside a cargo

§Example
use nanocld_client::NanocldClient;
use nanocld_client::models::cargo_config::CreateExecOptions;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let exec = CreateExecOptions {
 cmd: vec!["echo".into(), "hello".into()],
..Default::default()
};
let result = client.create_exec("my-cargo", exec, None).await.unwrap();
println!("{}", result);
source

pub async fn inspect_exec( &self, id: &str, ) -> HttpClientResult<ExecInspectResponse>

Inspect an exec command inside a cargo instance.

§Example
use nanocld_client::NanocldClient;
use nanocld_client::models::cargo_config::{CreateExecOptions, StartExecOptions};

let client = NanocldClient::connect_to("http://localhost:8585", None);
let exec = CreateExecOptions {
  cmd: Some(vec!["echo".into(), "hello".into()]),
  ..Default::default()
};
let result = client.create_exec("my-cargo", exec, None).await.unwrap();
let mut rx = client
  .start_exec(&result.id, StartExecOptions::default())
  .await
  .unwrap();
while let Some(_out) = rx.next().await {}

client.inspect_exec(&result.id).await.unwrap();
let result = client.inspect_exec("my-cargo", exec, None).await.unwrap();
println!("{}", result);
source

pub async fn start_exec( &self, id: &str, exec: &StartExecOptions, ) -> HttpClientResult<Receiver<HttpResult<OutputLog>>>

Run an command inside a cargo

§Example
use futures::StreamExt;
use nanocld_client::NanocldClient;
use nanocld_client::models::cargo_config::CreateExecOptions;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let exec = CreateExecOptions {
 cmd: vec!["echo".into(), "hello".into()],
..Default::default()
};
let result = client.create_exec("my-cargo", exec, None).await.unwrap();
let mut rx = client.start_exec(&result.id, StartExec::default(), None).await.unwrap();
while let Some(output) = rx.next().await {
 println!("{}", output);
};
source§

impl NanocldClient

source

pub async fn get_version(&self) -> HttpClientResult<BinaryInfo>

Get the version of the daemon

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.get_version().await;
source

pub async fn watch_events( &self, conditions: Option<Vec<EventCondition>>, ) -> HttpClientResult<Receiver<HttpResult<Event>>>

Watch daemon events It will emit an event when the daemon state change

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let mut stream = client.watch_events(None).await?;
while let Some(event) = stream.next().await {
 println!("{:?}", event);
}
source

pub async fn ping(&self) -> HttpClientResult<()>

Check if the daemon is running

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.ping().await;
source

pub async fn info(&self) -> HttpClientResult<HostInfo>

Get details about the host and docker daemon

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let info = client.info().await.unwrap();
source§

impl NanocldClient

source

pub async fn list_resource( &self, query: Option<&GenericFilter>, ) -> HttpClientResult<Vec<Resource>>

List existing resources in the system.

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_resource().await;
source

pub async fn create_resource( &self, data: &ResourcePartial, ) -> HttpClientResult<Resource>

Create a new resource from a partial resource in the system.

§Example
use nanocld_client::NanocldClient;
use nanocl_stubs::resource::ResourceKind;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.create_resource(&ResourcePartial {
  name: "my-resource".into(),
  kind: String::from("Custom")s,
  // Your data
  data: serde_json::json!({}),
}).await;
source

pub async fn inspect_resource(&self, key: &str) -> HttpClientResult<Resource>

Inspect an existing resource

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.inspect_resource("my-resource").await;
source

pub async fn put_resource( &self, key: &str, config: &ResourceUpdate, ) -> HttpClientResult<Resource>

Update the new resource spec and add an history entry

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.patch_resource("my-resource", serde_json::json!({})).await;
source

pub async fn delete_resource(&self, key: &str) -> HttpClientResult<()>

Delete an existing resource

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.delete_resource("my-resource").await;
source

pub async fn list_history_resource( &self, key: &str, ) -> HttpClientResult<Vec<ResourceSpec>>

List history of an existing resource

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_history_resource("my-resource").await;
source

pub async fn revert_resource( &self, name: &str, key: &str, ) -> HttpClientResult<Resource>

Revert a resource to a previous version

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let history = client.list_history_resource("my-resource").await.unwrap().first().unwrap();
let res = client.revert_resource("my-resource", history.key).await;
source§

impl NanocldClient

source

pub async fn create_vm( &self, vm: &VmSpecPartial, namespace: Option<&str>, ) -> HttpClientResult<Vm>

Create a new virtual machine in the system.

source

pub async fn list_vm( &self, query: Option<&GenericFilterNsp>, ) -> HttpClientResult<Vec<VmSummary>>

List existing vms

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_vm(None).await;
source

pub async fn delete_vm( &self, name: &str, namespace: Option<&str>, ) -> HttpClientResult<()>

Delete a vm by it’s name and namespace

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.delete_vm("my-vm", None).await;
source

pub async fn inspect_vm( &self, name: &str, namespace: Option<&str>, ) -> HttpClientResult<VmInspect>

Inspect a vm by it’s name and namespace And get detailed information about it

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.inspect_vm("my-vm", None).await;
source

pub async fn patch_vm( &self, name: &str, vm: &VmSpecUpdate, namespace: Option<&str>, ) -> HttpClientResult<()>

Patch a vm by it’s name and namespace to update it’s spec

source

pub async fn attach_vm( &self, name: &str, namespace: Option<&str>, ) -> HttpClientResult<WsConnection<Base>>

Attach to a vm by it’s name and namespace and return websocket stream to send input and receive output from the vm tty

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.attach_vm("my-vm", None).await;
source§

impl NanocldClient

source

pub async fn import_vm_image<S, E>( &self, name: &str, stream: S, ) -> HttpClientResult<()>
where S: Stream<Item = Result<Bytes, E>> + Unpin + 'static, E: Error + 'static,

This method will import a vm image from a stream of bytes.

source

pub async fn list_vm_image( &self, query: Option<&GenericFilter>, ) -> HttpClientResult<Vec<VmImage>>

List existing vm images in the system.

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_vm_image().await;
source

pub async fn delete_vm_image(&self, name: &str) -> HttpClientResult<()>

Delete a vm image by it’s name

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.delete_vm_image("my-image").await;
source

pub async fn clone_vm_image( &self, name: &str, clone_name: &str, ) -> HttpClientResult<Receiver<HttpResult<VmImageCloneStream>>>

Clone a vm image by it’s name

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.clone_vm_image("my-image", "my-clone").await;
source

pub async fn resize_vm_image( &self, name: &str, opts: &VmImageResizePayload, ) -> HttpClientResult<VmImage>

Resize a vm image by it’s name

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.resize_vm_image("my-image", VmImageResizePayload {
  size: 45640,
  shrink: false,
}).await;
source§

impl NanocldClient

source

pub async fn list_node(&self) -> HttpClientResult<Vec<Node>>

List existing nodes in the system

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_node().await;
source§

impl NanocldClient

source

pub async fn list_secret( &self, query: Option<&GenericFilter>, ) -> HttpClientResult<Vec<Secret>>

List existing secrets in the system.

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_secret(None).await;
source

pub async fn create_secret( &self, item: &SecretPartial, ) -> HttpClientResult<Secret>

Create a new secret

source

pub async fn patch_secret( &self, key: &str, item: &SecretUpdate, ) -> HttpClientResult<Secret>

Patch a secret by it’s key to update it with new data

source

pub async fn inspect_secret(&self, key: &str) -> HttpClientResult<Secret>

Inspect a secret by it’s key to get more information about it

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let secret = client.inspect_secret("my-secret").await?;
source

pub async fn delete_secret(&self, key: &str) -> HttpClientResult<()>

Delete a secret by it’s key

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
client.delete_secret("my-secret").await?;
source§

impl NanocldClient

source

pub async fn list_job( &self, query: Option<&GenericFilter>, ) -> HttpClientResult<Vec<JobSummary>>

List existing jobs in the system

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_job().await;
source

pub async fn inspect_job(&self, name: &str) -> HttpClientResult<JobInspect>

Get information about a job by it’s name

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.inspect_job("my_job").await;
source

pub async fn create_job(&self, job: &JobPartial) -> HttpClientResult<Job>

Create a job from a JobPartial

§Example
use nanocld_client::NanocldClient;
use nanocld_client::bollard_next::container::Config;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.create_job(&JobPartial {
 name: "my_job".to_string(),
 containers: vec![
  Config {
    image: Some("alpine:latest".to_string()),
    cmd: Some(vec!["echo".to_string(), "Hello world".to_string()]),
  }
 ],
}).await;
source

pub async fn delete_job(&self, name: &str) -> HttpClientResult<()>

Delete a job by it’s name

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.delete_job("my_job").await;
source§

impl NanocldClient

source

pub async fn list_process( &self, query: Option<&GenericFilter>, ) -> HttpClientResult<Vec<Process>>

List of current processes (vm, job, cargo) managed by the daemon

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_process(None).await;
source

pub async fn logs_process( &self, name: &str, query: Option<&ProcessLogQuery>, ) -> HttpClientResult<Receiver<HttpResult<ProcessOutputLog>>>

Get Log of a single process by it’s name or id Cargoes, jobs, can have multiple instances, this endpoint get logs of a single instance

source

pub async fn logs_processes( &self, kind: &str, name: &str, query: Option<&ProcessLogQuery>, ) -> HttpClientResult<Receiver<HttpResult<ProcessOutputLog>>>

Get logs of processes for a specific object Cargoes, jobs, can have multiple instances, this endpoint get logs all instances

source

pub async fn start_process( &self, kind: &str, name: &str, namespace: Option<&str>, ) -> HttpClientResult<()>

Start a process by it’s kind and name and namespace

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.start_process("cargo", "my-cargo", None).await;
source

pub async fn restart_process( &self, kind: &str, name: &str, namespace: Option<&str>, ) -> HttpClientResult<()>

Restart a process by it’s kind and name and namespace

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.restart_process("cargo", "my-cargo", None).await;
source

pub async fn stop_process( &self, kind: &str, name: &str, namespace: Option<&str>, ) -> HttpClientResult<()>

Stop a process by it’s kind and name and namespace

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.stop_cargo("my-cargo", None).await;
source

pub async fn kill_process( &self, kind: &str, name: &str, query: Option<&CargoKillOptions>, namespace: Option<&str>, ) -> HttpClientResult<()>

Kill processes by it’s kind and name and namespace

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.kill_process("cargo", "my-cargo", None, None).await;
source

pub async fn wait_process( &self, kind: &str, name: &str, query: Option<&ProcessWaitQuery>, ) -> HttpClientResult<Receiver<HttpResult<ProcessWaitResponse>>>

A stream is returned, data are sent when processes reach status

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let stream = client.wait_process("job", "my_job", None).await.unwrap();
source

pub async fn stats_processes( &self, kind: &str, name: &str, query: Option<&ProcessStatsQuery>, ) -> HttpClientResult<Receiver<HttpResult<ProcessStats>>>

The stats are streamed as a Receiver of stats

source§

impl NanocldClient

source

pub async fn list_metric( &self, query: Option<&GenericFilter>, ) -> HttpClientResult<Vec<Metric>>

List existing metrics in the system

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_metric(None).await;
source

pub async fn create_metric( &self, metric: &MetricPartial, ) -> HttpClientResult<Metric>

Create a new metric in the system

§Example
use nanocld_client::NanocldClient;
use nanocld_client::stubs::metric::MetricPartial;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_metric(&MetricPartial {
 kind: "my-source.io/type".to_owned(),
 data: serde_json::json!({
  "name": "my-metric",
  "description": "My metric",
 }),
}).await;
source

pub async fn inspect_metric(&self, key: &str) -> HttpClientResult<Metric>

Inspect a metric in the system

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.inspect_metric("my-metric-key").await;
source§

impl NanocldClient

source

pub async fn list_resource_kind( &self, query: Option<&GenericFilter>, ) -> HttpClientResult<Vec<ResourceKind>>

List existing resource kinds in the system.

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let res = client.list_resource_kind(None).await;
source

pub async fn create_resource_kind( &self, item: &ResourceKindPartial, ) -> HttpClientResult<ResourceKind>

Create a new secret

source

pub async fn inspect_resource_kind( &self, key: &str, ) -> HttpClientResult<ResourceKindInspect>

Inspect a resource kind by it’s key to get more information about it

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let secret = client.inspect_resource_kind("ncproxy.io/rule").await?;
source

pub async fn inspect_resource_kind_version( &self, key: &str, version: &str, ) -> HttpClientResult<ResourceKindVersion>

Inspect a version of resource kind

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
let secret = client.inspect_resource_kind_version("ncproxy.io/rule", "v0.1").await?;
source

pub async fn delete_resource_kind(&self, key: &str) -> HttpClientResult<()>

Delete a resource kind by it’s key

§Example
use nanocld_client::NanocldClient;

let client = NanocldClient::connect_to("http://localhost:8585", None);
client.delete_resource_kind("ncproxy.io/rule").await?;

Trait Implementations§

source§

impl Clone for NanocldClient

source§

fn clone(&self) -> NanocldClient

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Display for NanocldClient

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T