We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tech debt reduction
Let's define a procedural macro to make implementing administration functions easier, for example, we can implement the procedure_state as below:
#[admin_fn(name = "procedure_state", return = "StringVector")] async fn procedure_state(procedure_service_handler: &ProcedureServiceHandlerRef, pid: &str) -> Result<String > { let ProcedureStateResponse { status, error, .. } = procedure_service_handler.query_procedure_state(pid).await?; let status = ProcedureStatus::try_from(status) .map(|v| v.as_str_name()) .unwrap_or("Unknown"); let state = ProcedureStateJson { status: status.to_string(), error: if error.is_empty() { None } else { Some(error) }, }; Ok(Some(serde_json::to_string(&state).unwrap_or_default())) }
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What type of enhancement is this?
Tech debt reduction
What does the enhancement do?
Let's define a procedural macro to make implementing administration functions easier, for example, we can implement the procedure_state as below:
Implementation challenges
No response
The text was updated successfully, but these errors were encountered: