pub struct FlakeShape {
pub name: String,
pub type_marker: String,
pub required_keys: Vec<String>,
pub spread_from_output_fn: bool,
pub never_leak_from_flake_body: Vec<String>,
}Expand description
Top-level flake result shape policy.
required_keys is informational only — the Rust assembler in
flake_eval.rs is responsible for producing the values (they
all require eval-time state the spec doesn’t have access to).
The shape exists to answer yes/no decisions the assembler makes
along the way.
Fields§
§name: String§type_marker: String§required_keys: Vec<String>§spread_from_output_fn: bool§never_leak_from_flake_body: Vec<String>Implementations§
Source§impl FlakeShape
impl FlakeShape
Sourcepub fn allow_body_key(&self, key: &str) -> bool
pub fn allow_body_key(&self, key: &str) -> bool
Is key allowed to be copied from the parsed flake body
({ description = ...; outputs = ...; }) onto the top-level
flake result?
Note: the assembler always has to consult this — the default
answer under CppNix parity is “no for most keys”. Only
explicitly-allowed keys (typically inputs) should cross
over, and those are handled by named inserts, not by body
iteration.
Sourcepub fn spreads_output_fn(&self) -> bool
pub fn spreads_output_fn(&self) -> bool
Whether the outputs-function’s returned attrset spreads (its keys merge directly) into the top-level flake result. CppNix says yes; every other policy is a departure.
Trait Implementations§
Source§impl Clone for FlakeShape
impl Clone for FlakeShape
Source§fn clone(&self) -> FlakeShape
fn clone(&self) -> FlakeShape
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 FlakeShape
impl Debug for FlakeShape
Source§impl<'de> Deserialize<'de> for FlakeShape
impl<'de> Deserialize<'de> for FlakeShape
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 Serialize for FlakeShape
impl Serialize for FlakeShape
Source§impl Spec for FlakeShape
impl Spec for FlakeShape
Source§const CANONICAL_LISP: &'static str = crate::flake::CPPNIX_FLAKE_SHAPE_LISP
const CANONICAL_LISP: &'static str = crate::flake::CPPNIX_FLAKE_SHAPE_LISP
include_str! in the domain’s own module.Source§impl TataraDomain for FlakeShape
impl TataraDomain for FlakeShape
Source§fn compile_from_args(args: &[Sexp]) -> Result<Self>
fn compile_from_args(args: &[Sexp]) -> Result<Self>
Auto Trait Implementations§
impl Freeze for FlakeShape
impl RefUnwindSafe for FlakeShape
impl Send for FlakeShape
impl Sync for FlakeShape
impl Unpin for FlakeShape
impl UnsafeUnpin for FlakeShape
impl UnwindSafe for FlakeShape
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.