/// Set all fields for an `SvcLoad` message that we can from the given opts. This function
/// populates all *shared* options between `run` and `load`.
Set all fields for an `SvcLoad` message that we can from the given opts. This function
populates all *shared* options between `run` and `load`.
Set all fields for an ` SvcLoad ` message that we can from the given opts . This function populates all * shared * options between ` run ` and ` load ` .
fn update_svc_load_from_input(m: &ArgMatches,
                              msg: &mut habitat_sup_protocol::ctl::SvcLoad)
                              -> Result<()> {
    msg.bldr_url = Some(bldr_url(m));
    msg.bldr_channel = Some(channel(m).to_string());
    msg.application_environment = get_app_env_from_input(m)?;
    msg.binds = get_binds_from_input(m)?;
    msg.config_from = get_config_from_input(m);
    if m.is_present("FORCE") {
        msg.force = Some(true);
    }
    msg.group = get_group_from_input(m);
    msg.svc_encrypted_password = get_password_from_input(m)?;
    msg.binding_mode = get_binding_mode_from_input(m).map(|v| v as i32);
    msg.topology = get_topology_from_input(m).map(|v| v as i32);
    msg.update_strategy = get_strategy_from_input(m).map(|v| v as i32);
    Ok(())
}
fn update_svc_load_from_input ( m : & ArgMatches , msg : & mut habitat_sup_protocol :: ctl :: SvcLoad ) -> Result < ( ) > { msg . bldr_url = Some ( bldr_url ( m ) ) ; msg . bldr_channel = Some ( channel ( m ) . to_string ( ) ) ; msg . application_environment = get_app_env_from_input ( m ) ? ; msg . binds = get_binds_from_input ( m ) ? ; msg . config_from = get_config_from_input ( m ) ; if m . is_present ( " " ) { msg . force = Some ( true ) ; } msg . group = get_group_from_input ( m ) ; msg . svc_encrypted_password = get_password_from_input ( m ) ? ; msg . binding_mode = get_binding_mode_from_input ( m ) . map ( | v | v as i32 ) ; msg . topology = get_topology_from_input ( m ) . map ( | v | v as i32 ) ; msg . update_strategy = get_strategy_from_input ( m ) . map ( | v | v as i32 ) ; Ok ( ( ) ) }
Set all fields for an `SvcLoad` message that we can from the given opts.
Set all fields for an ` SvcLoad ` message that we can from the given opts .
m
&ArgMatches
msg
&mut habitat_sup_protocol::ctl::SvcLoad