pub async fn nexus_add_child(
    args: rpc::AddChildNexusRequest,
) -> Result<rpc::Child, Error> {
    let n = nexus_lookup(&args.uuid)?;
    // TODO: do not add child if it already exists (idempotency)
    // For that we need api to check existence of child by name (not uri that
    // contain parameters that may change).
    n.add_child(&args.uri, args.norebuild).await?;
    n.get_child_by_name(&args.uri).map(|ch| ch.to_grpc())
}
/// Add child to nexus. Normally this would have been part of grpc method
/// implementation, however it is not allowed to use '?' in `locally` macro.
/// So we implement it as a separate function.
Add child to nexus. Normally this would have been part of grpc method
implementation, however it is not allowed to use '?' in `locally` macro.
So we implement it as a separate function.
Add child to nexus . Normally this would have been part of grpc method implementation however it is not allowed to use ' ? ' in ` locally ` macro . So we implement it as a separate function .
pub async fn nexus_add_child(
    args: rpc::AddChildNexusRequest,
) -> Result<rpc::Child, Error> {
    let n = nexus_lookup(&args.uuid)?;
    // TODO: do not add child if it already exists (idempotency)
    // For that we need api to check existence of child by name (not uri that
    // contain parameters that may change).
    n.add_child(&args.uri, args.norebuild).await?;
    n.get_child_by_name(&args.uri).map(|ch| ch.to_grpc())
}
pub async fn nexus_add_child ( args : rpc :: AddChildNexusRequest , ) -> Result < rpc :: Child , Error > { let n = nexus_lookup ( & args . uuid ) ? ; // TODO: do not add child if it already exists (idempotency) // For that we need api to check existence of child by name (not uri that // contain parameters that may change). n . add_child ( & args . uri , args . norebuild ) . await ? ; n . get_child_by_name ( & args . uri ) . map ( | ch | ch . to_grpc ( ) ) }
Add child to nexus.
Add child to nexus .
args
rpc::AddChildNexusRequest