proxmox-api 0.2.0

Rust bindings for the Proxmox VE HTTP API
Documentation
#[derive(Debug, Clone)]
pub struct ApiversionClient<T> {
    client: T,
    path: String,
}
impl<T> ApiversionClient<T>
where
    T: crate::client::Client,
{
    pub fn new(client: T, parent_path: &str) -> Self {
        Self {
            client,
            path: format!("{}{}", parent_path, "/apiversion"),
        }
    }
}
impl<T> ApiversionClient<T>
where
    T: crate::client::Client,
{
    #[doc = "Return the version of the cluster join API available on this node."]
    #[doc = ""]
    #[doc = "Permission check: perm(\"/\", [\"Sys.Audit\"])"]
    pub async fn get(&self) -> Result<u64, T::Error> {
        let path = self.path.to_string();
        Ok(self
            .client
            .get::<_, crate::types::UnsignedInteger>(&path, &())
            .await?
            .get())
    }
}