/// Perform an add policy request and return the result, formatted as a string.
Perform an add policy request and return the result, formatted as a string.
Perform an add policy request and return the result formatted as a string .
async fn add_policy_request(
    proxy: &VolumePolicyControllerProxy,
    target: fidl_fuchsia_media::AudioRenderUsage,
    parameters: PolicyParameters,
) -> String {
    let add_result = proxy.add_policy(&mut Target::Stream(target), &mut parameters.clone()).await;
    match add_result {
        Ok(policy_id) => {
            format!(
                "Added parameters '{:?}'; policy id is {:?}",
                parameters,
                policy_id.expect("invalid policy_id received in the add policy request.")
            )
        }
        Err(err) => format!("{:#?}", err),
    }
}
async fn add_policy_request ( proxy : & VolumePolicyControllerProxy , target : fidl_fuchsia_media :: AudioRenderUsage , parameters : PolicyParameters , ) -> String { let add_result = proxy . add_policy ( & mut Target :: Stream ( target ) , & mut parameters . clone ( ) ) . await ; match add_result { Ok ( policy_id ) => { format ! ( " " parameters policy_id expect ( " " ) ) } Err ( err ) => format ! ( " " err ) , } }
Perform an add policy request and return the result, formatted as a string.
Perform an add policy request and return the result formatted as a string .
proxy
&VolumePolicyControllerProxy
target
fidl_fuchsia_media::AudioRenderUsage
parameters
PolicyParameters