#[non_exhaustive]pub enum StructuredOutput {
BuildsFinished {
client: StructuredBuildArtifacts,
server: Option<StructuredBuildArtifacts>,
},
PrintCargoArgs {
args: Vec<String>,
env: Vec<(Cow<'static, str>, String)>,
},
BuildFinished {
artifacts: StructuredBuildArtifacts,
},
BuildUpdate {
stage: BuildStage,
},
Hotpatch {
jump_table: JumpTable,
artifacts: StructuredBuildArtifacts,
},
CargoOutput {
message: CompilerMessage,
},
RustcOutput {
message: Diagnostic,
},
BundleOutput {
bundles: Vec<PathBuf>,
client: StructuredBuildArtifacts,
server: Option<StructuredBuildArtifacts>,
},
HtmlTranslate {
html: String,
},
Success,
Error {
message: String,
},
}Expand description
The structured output for the CLI
This is designed such that third party tools can reliably consume the output of the CLI when outputting json.
Not every log outputted will be parsable, but all structured logs should be.
This means the debug format of this log needs to be parsable json, not the default debug format.
We guarantee that the last line of the command represents the success of the command, such that tools can simply parse the last line of the output.
There might be intermediate lines that are parseable as structured logs (which you can put here) but they are not guaranteed to be, such that we can provide better error messages for the user.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BuildsFinished
PrintCargoArgs
BuildFinished
Fields
§
artifacts: StructuredBuildArtifactsBuildUpdate
Fields
§
stage: BuildStageHotpatch
CargoOutput
Fields
§
message: CompilerMessageRustcOutput
Fields
§
message: DiagnosticBundleOutput
HtmlTranslate
Success
Error
Trait Implementations§
Source§impl Clone for StructuredOutput
impl Clone for StructuredOutput
Source§fn clone(&self) -> StructuredOutput
fn clone(&self) -> StructuredOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StructuredOutput
impl Debug for StructuredOutput
Source§impl<'de> Deserialize<'de> for StructuredOutput
impl<'de> Deserialize<'de> for StructuredOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for StructuredOutput
impl Display for StructuredOutput
Auto Trait Implementations§
impl Freeze for StructuredOutput
impl RefUnwindSafe for StructuredOutput
impl Send for StructuredOutput
impl Sync for StructuredOutput
impl Unpin for StructuredOutput
impl UnwindSafe for StructuredOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more