Skip to content
Snippets Groups Projects
Commit 31cba144 authored by Nicolas80's avatar Nicolas80
Browse files

* Added SerializeJson & SerializeHuman traits

  * SerializeJson is automatically implemented for Serialize types
  * SerializeHuman has to be manually implemented
* Added print_command_output & print_command_output_async methods to handle converting the command output (or error) into Json or Human format
  * Those take an OutputFormat and a closure of the function to execute returning a struct implementing `SerializeJson + SerializeHuman` or a GcliError
  * In case of GcliError for `json` OutputFormat it will get converted to JsonOutputError and serializedz to json
* Only used those for `vault inspect` command for now
parent cdc129ad
Branches
Tags
Loading
Checking pipeline status