#[repr(u8)]pub enum HaxMessage {
Show 33 variants
Diagnostic {
diagnostic: Diagnostics,
working_dir: Option<PathBuf>,
},
BinaryNotFound {
binary_name: String,
env_var: String,
hint: Option<String>,
},
ProducedFile {
path: PathBuf,
wrote: bool,
},
HaxEngineFailure {
exit_code: i32,
},
CargoBuildFailure = 3,
WarnExperimentalBackend {
backend: Backend,
},
ProfilingData(ProfilingData),
Stats {
errors_per_item: Vec<(DefId, usize)>,
},
GenericError {
message: String,
},
GenericWarning {
message: String,
},
Step {
verb: String,
target: String,
},
SubprocessOutput {
prefix: String,
line: String,
},
OutputTruncated {
prefix: String,
remaining: usize,
log_path: PathBuf,
},
UnsupportedOption {
option: String,
backend: BackendName,
},
HaxTomlWarning {
path: PathBuf,
message: String,
},
HaxTomlError {
path: PathBuf,
message: String,
},
MemberToolOverrides {
crate_name: String,
path: PathBuf,
entries: Vec<String>,
},
StrayHaxToml {
path: PathBuf,
},
UnverifiedInstall {
tool: String,
version: String,
url: String,
},
NonDefaultToolVersion {
tool: String,
used: String,
tested: String,
},
HaxLibIncompatible {
crate_name: String,
found: String,
binary: String,
expected: String,
newer: bool,
},
CachedUnverifiedToolInUse {
tool: String,
version: String,
},
ToolsShow {
tools: Vec<ToolResolution>,
versions: Vec<ToolResolution>,
hax_lib: Vec<HaxLibStatus>,
member_overrides: Vec<MemberOverride>,
},
ToolsList {
tools: Vec<ToolListing>,
installed_only: bool,
},
ToolsInstalled {
installed: Vec<InstalledTool>,
},
LakefilePinDrift {
path: PathBuf,
name: String,
found: String,
expected: String,
},
ToolRemoved {
tool: String,
version: String,
},
ToolsCleaned {
removed: usize,
},
ToolsPinned {
path: PathBuf,
changes: Vec<PinChange>,
skipped: Vec<String>,
},
RootModuleMissingImport {
path: PathBuf,
import: String,
},
RootModuleStaleImport {
path: PathBuf,
import: String,
},
ScenarioDryRun {
name: String,
package: String,
lines: Vec<String>,
},
ScenarioSummary {
total: usize,
failed: Vec<String>,
},
}Variants§
Diagnostic
BinaryNotFound
ProducedFile
HaxEngineFailure
CargoBuildFailure = 3
WarnExperimentalBackend
ProfilingData(ProfilingData)
Stats
GenericError
GenericWarning
Step
SubprocessOutput
OutputTruncated
UnsupportedOption
HaxTomlWarning
HaxTomlError
MemberToolOverrides
StrayHaxToml
UnverifiedInstall
NonDefaultToolVersion
HaxLibIncompatible
CachedUnverifiedToolInUse
ToolsShow
The result of cargo hax tools show.
Fields
tools: Vec<ToolResolution>The workspace-wide resolution of each managed tool.
versions: Vec<ToolResolution>The workspace-wide resolution of each declared-only version.
hax_lib: Vec<HaxLibStatus>Every crate with a direct hax-lib dependency.
member_overrides: Vec<MemberOverride>ToolsList
The result of cargo hax tools list.
Fields
tools: Vec<ToolListing>ToolsInstalled
The result of cargo hax tools install: the versions now in the
cache. Versions that failed to install are reported as errors of
their own and are absent here.
Fields
installed: Vec<InstalledTool>LakefilePinDrift
An existing generated Lean project file pins a version that differs from the current resolution.
Fields
ToolRemoved
The result of cargo hax tools remove: the version deleted from
the cache.
ToolsCleaned
The result of cargo hax tools clean: how many cached tool
versions the deleted cache held.
ToolsPinned
The result of cargo hax tools pin: the entries written into the
edited hax.toml, and the path-pinned ones left untouched. Empty
changes means the file was not written.
RootModuleMissingImport
A file the root module of a generated Lean package should import exists, but the root module does not import it.
RootModuleStaleImport
The root module of a generated Lean package imports an extraction file that no longer exists.
ScenarioDryRun
The resolved invocation of one proof scenario, as
extract --dry-run prints it.
Fields
ScenarioSummary
The summary of an extract run.
Implementations§
Source§impl HaxMessage
impl HaxMessage
Source§impl HaxMessage
impl HaxMessage
Sourcepub fn is_error(&self) -> bool
pub fn is_error(&self) -> bool
Whether this message reports an error, i.e. renders at error level.
Reporting one commits the process to a failing exit status. Kept
exhaustive so that a new variant forces a decision here, matching
the level Self::render_styled gives it.
pub fn report(self, message_format: MessageFormat, rctx: Option<&mut ReportCtx>)
pub fn report_styled(self, rctx: Option<&mut ReportCtx>)
pub fn render( self, message_format: MessageFormat, rctx: Option<&mut ReportCtx>, ) -> Option<String>
pub fn render_styled(self, rctx: Option<&mut ReportCtx>) -> String
Trait Implementations§
Source§impl Clone for HaxMessage
impl Clone for HaxMessage
Source§fn clone(&self) -> HaxMessage
fn clone(&self) -> HaxMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HaxMessage
impl Debug for HaxMessage
Source§impl<'de> Deserialize<'de> for HaxMessage
impl<'de> Deserialize<'de> for HaxMessage
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>,
Source§impl Hash for HaxMessage
impl Hash for HaxMessage
Source§impl JsonSchema for HaxMessage
impl JsonSchema for HaxMessage
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for HaxMessage
impl PartialEq for HaxMessage
Source§impl Serialize for HaxMessage
impl Serialize for HaxMessage
impl Eq for HaxMessage
impl StructuralPartialEq for HaxMessage
Auto Trait Implementations§
impl Freeze for HaxMessage
impl RefUnwindSafe for HaxMessage
impl Send for HaxMessage
impl Sync for HaxMessage
impl Unpin for HaxMessage
impl UnwindSafe for HaxMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more