Skip to content

Using std::result::Result in request/response structures #767

Closed Answered by Slonegg
Slonegg asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you. Adding the following struct has resolved the issue:

#[derive(ToSchema)]
#[schema(as = Result<CommandOutput, String>)]
pub enum CommandResultSchema {
    Ok(CommandOutput),
    Err(String),
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Slonegg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants