pub fn parse_pending_deployment(status: &StatusJson) -> Result<Option<(Release, String)>> {
    // There can be at most one staged/pending rpm-ostree deployment,
    // thus we only consider the first matching entry (if any).
    let staged = status.deployments.iter().find(|d| d.staged).cloned();

    match staged {
        None => Ok(None),
        Some(json) => {
            let stream = json.base_metadata.stream.clone();
            ensure!(!stream.is_empty(), "empty stream value");
            let release = json.into_release();
            Ok(Some((release, stream)))
        }
    }
}
/// Parse pending deployment from status object.
Parse pending deployment from status object.
Parse pending deployment from status object .
pub fn parse_pending_deployment(status: &StatusJson) -> Result<Option<(Release, String)>> {
    // There can be at most one staged/pending rpm-ostree deployment,
    // thus we only consider the first matching entry (if any).
    let staged = status.deployments.iter().find(|d| d.staged).cloned();
    match staged {
        None => Ok(None),
        Some(json) => {
            let stream = json.base_metadata.stream.clone();
            ensure!(!stream.is_empty(), "empty stream value");
            let release = json.into_release();
            Ok(Some((release, stream)))
        }
    }
}
pub fn parse_pending_deployment ( status : & StatusJson ) -> Result < Option < ( Release , String ) > > { // There can be at most one staged/pending rpm-ostree deployment, // thus we only consider the first matching entry (if any). let staged = status . deployments . iter ( ) . find ( | d | d . staged ) . cloned ( ) ; match staged { None => Ok ( None ) , Some ( json ) => { let stream = json . base_metadata . stream . clone ( ) ; ensure ! ( stream is_empty ( ) " " ) ; let release = json . into_release ( ) ; Ok ( Some ( ( release , stream ) ) ) } } }
Parse pending deployment from status object.
Parse pending deployment from status object .
status
&StatusJson