Slide 37
Slide 37 text
Beautiful is better than ugly.
#[derive(Serialize, Deserialize, Debug)]
pub struct Deploy {
#[serde(rename="environment")]
pub env: String,
pub name: Option,
pub url: Option,
}
impl Deploy {
pub fn list(&self, api: &Api, id: u64) -> ApiResult> {
api.get(&format!("/deploys/{}/", id))?.convert()
}
}