fn one_target_capability_name<T, U>(in_obj: &T, to_obj: &U) -> Result<cml::Name, Error>
where
    T: cml::CapabilityClause,
    U: cml::AsClause + cml::PathClause,
{
    match all_target_capability_names(in_obj, to_obj) {
        Some(OneOrMany::One(target_name)) => Ok(target_name),
        Some(OneOrMany::Many(_)) => {
            Err(Error::internal("expecting one capability, but multiple provided"))
        }
        _ => Err(Error::internal("expecting one capability, but none provided")),
    }
}
/// Return the single target name specified in the given routing declaration.
Return the single target name specified in the given routing declaration.
Return the single target name specified in the given routing declaration .
fn one_target_capability_name<T, U>(in_obj: &T, to_obj: &U) -> Result<cml::Name, Error>
where
    T: cml::CapabilityClause,
    U: cml::AsClause + cml::PathClause,
{
    match all_target_capability_names(in_obj, to_obj) {
        Some(OneOrMany::One(target_name)) => Ok(target_name),
        Some(OneOrMany::Many(_)) => {
            Err(Error::internal("expecting one capability, but multiple provided"))
        }
        _ => Err(Error::internal("expecting one capability, but none provided")),
    }
}
fn one_target_capability_name < T , U > ( in_obj : & T , to_obj : & U ) -> Result < cml :: Name , Error > where T : cml :: CapabilityClause , U : cml :: AsClause + cml :: PathClause , { match all_target_capability_names ( in_obj , to_obj ) { Some ( OneOrMany :: One ( target_name ) ) => Ok ( target_name ) , Some ( OneOrMany :: Many ( _ ) ) => { Err ( Error :: internal ( " " ) ) } _ => Err ( Error :: internal ( " " ) ) , } }
Return the single target name specified in the given routing declaration.
Return the single target name specified in the given routing declaration .
in_obj
&T
to_obj
&U
in_obj
&T
to_obj
&U