pub struct ToolchainFingerprint {
pub lean_version: &'static str,
pub resolved_version: &'static str,
pub header_sha256: &'static str,
pub fixture_sha256: &'static str,
pub host_triple: &'static str,
}Expand description
Typed identity of the Lean toolchain this crate was compiled against.
Eq + Hash so the fingerprint can serve as a HashMap key for caches
keyed by toolchain identity (e.g. compiled module caches, proof caches).
Clone + Debug are derived for convenience; every field is &'static str
so cloning is a pointer copy.
Fields§
§lean_version: &'static strLEAN_VERSION_STRING from the active lean.h.
resolved_version: &'static strThe version string from the matched
SupportedToolchain entry. Equal
to Self::lean_version except when several releases share one
lean.h digest, in which case it is the first version listed for
that entry.
header_sha256: &'static strSHA-256 of the lean.h this build was resolved against.
fixture_sha256: &'static strSHA-256 of the workspace Lake fixture artifacts, or zero when the crate is built from a published tarball without workspace fixtures.
host_triple: &'static strTarget triple this crate was built for.
Implementations§
Source§impl ToolchainFingerprint
impl ToolchainFingerprint
Sourcepub fn is_supported(&self) -> bool
pub fn is_supported(&self) -> bool
Return true iff Self::lean_version is included in the
SUPPORTED_TOOLCHAINS window.
The build script already filters at compile time, so this method
returns true for any binary that compiled successfully. It is
exposed for tooling that constructs a fingerprint from an external
source (e.g. a remote-worker handshake).
Trait Implementations§
Source§impl Clone for ToolchainFingerprint
impl Clone for ToolchainFingerprint
Source§fn clone(&self) -> ToolchainFingerprint
fn clone(&self) -> ToolchainFingerprint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolchainFingerprint
impl Debug for ToolchainFingerprint
Source§impl Default for ToolchainFingerprint
impl Default for ToolchainFingerprint
Source§impl Hash for ToolchainFingerprint
impl Hash for ToolchainFingerprint
Source§impl PartialEq for ToolchainFingerprint
impl PartialEq for ToolchainFingerprint
Source§fn eq(&self, other: &ToolchainFingerprint) -> bool
fn eq(&self, other: &ToolchainFingerprint) -> bool
self and other values to be equal, and is used by ==.