proxmox-api 0.2.0

Rust bindings for the Proxmox VE HTTP API
Documentation
#[derive(Debug, Clone)]
pub struct CrushClient<T> {
    client: T,
    path: String,
}
impl<T> CrushClient<T>
where
    T: crate::client::Client,
{
    pub fn new(client: T, parent_path: &str) -> Self {
        Self {
            client,
            path: format!("{}{}", parent_path, "/crush"),
        }
    }
}
impl<T> CrushClient<T>
where
    T: crate::client::Client,
{
    #[doc = "Get OSD crush map"]
    #[doc = ""]
    #[doc = "Permission check: perm(\"/\", [\"Sys.Audit\", \"Datastore.Audit\"], any)"]
    pub async fn get(&self) -> Result<String, T::Error> {
        let path = self.path.to_string();
        self.client.get(&path, &()).await
    }
}