pub struct BuildDeclaration {
pub compiler: String,
pub plugin_api: String,
pub contract: String,
pub source: u64,
}Expand description
How a plugin was built: the compiler, and the two plugin crates it was compiled against.
A plugin loaded from a directory is accepted only when its declaration is
equal to BuildDeclaration::this_build in every part.
Fields§
§compiler: StringThe compiler, as rustc -V names it, such as
rustc 1.93.1 (01f6ddf75 2026-02-11).
plugin_api: StringThe version of razeri-plugin-api.
contract: StringThe version of razeri-plugin-contract.
source: u64A fingerprint of the source of both crates. Two builds carrying the same version numbers over different source have different fingerprints.
Implementations§
Source§impl BuildDeclaration
impl BuildDeclaration
Sourcepub fn this_build() -> Self
pub fn this_build() -> Self
How this build of razeri-plugin-api was made — the declaration a host
compares plugins against, and the one export_plugin!
exports from a plugin.
Sourcepub fn differences(&self, needs: &Self) -> Vec<BuildPart>
pub fn differences(&self, needs: &Self) -> Vec<BuildPart>
The parts in which self differs from needs, in the order a reader
meets them. Empty when the two are the same build.