pub struct RecipeCtx {
pub tool: String,
pub version: String,
pub prefix: PathBuf,
pub dep_prefixes: HashMap<String, PathBuf>,
pub target_macos: bool,
pub target_arm: bool,
}Expand description
Context a recipe is resolved against: identity, install prefix, resolved
dependency prefixes, and the target platform/arch used to constant-fold
on_macos / on_linux / on_arm / on_intel conditionals.
Fields§
§tool: StringFormula/tool name (e.g. jq).
version: StringVersion being built (resolves #{version}).
prefix: PathBufThe toolchain install prefix (resolves #{prefix}, #{bin}, …).
dep_prefixes: HashMap<String, PathBuf>Resolved dependency toolchains: Formula["x"].opt_* maps through
dep_prefixes["x"].
target_macos: boolConstant-fold on_macos / on_linux (and OS.mac? / OS.linux?).
target_arm: boolConstant-fold on_arm / on_intel (and Hardware::CPU.arm? /
Hardware::CPU.intel?).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RecipeCtx
impl<'de> Deserialize<'de> for RecipeCtx
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
impl StructuralPartialEq for RecipeCtx
Auto Trait Implementations§
impl Freeze for RecipeCtx
impl RefUnwindSafe for RecipeCtx
impl Send for RecipeCtx
impl Sync for RecipeCtx
impl Unpin for RecipeCtx
impl UnsafeUnpin for RecipeCtx
impl UnwindSafe for RecipeCtx
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