pub struct State {Show 17 fields
pub derivation_infos: IndexMap<DerivationId, DerivationInfo>,
pub store_path_infos: IndexMap<StorePathId, StorePathInfo>,
pub full_summary: DependencySummary,
pub forest_roots: Vec<DerivationId>,
pub build_cache: HashMap<(String, String), Vec<BuildReport>>,
pub start_time: f64,
pub progress_state: ProgressState,
pub store_path_ids: HashMap<StorePath, StorePathId>,
pub derivation_ids: HashMap<Derivation, DerivationId>,
pub touched_ids: HashSet<DerivationId>,
pub activities: HashMap<ActivityId, ActivityStatus>,
pub nix_errors: Vec<String>,
pub build_logs: Vec<String>,
pub traces: Vec<String>,
pub build_platform: Option<String>,
pub evaluation_state: EvalInfo,
pub builds_activity: Option<ActivityId>,
/* private fields */
}Expand description
Main state for ROM
Fields§
§derivation_infos: IndexMap<DerivationId, DerivationInfo>§store_path_infos: IndexMap<StorePathId, StorePathInfo>§full_summary: DependencySummary§forest_roots: Vec<DerivationId>§build_cache: HashMap<(String, String), Vec<BuildReport>>§start_time: f64§progress_state: ProgressState§store_path_ids: HashMap<StorePath, StorePathId>§derivation_ids: HashMap<Derivation, DerivationId>§touched_ids: HashSet<DerivationId>§activities: HashMap<ActivityId, ActivityStatus>§nix_errors: Vec<String>§build_logs: Vec<String>§traces: Vec<String>§build_platform: Option<String>§evaluation_state: EvalInfo§builds_activity: Option<ActivityId>Implementations§
Source§impl State
impl State
pub fn new() -> Self
pub fn with_platform(platform: Option<String>) -> Self
pub fn get_or_create_store_path_id(&mut self, path: StorePath) -> StorePathId
pub fn get_or_create_derivation_id(&mut self, drv: Derivation) -> DerivationId
Sourcepub fn populate_derivation_dependencies(&mut self, drv_id: DerivationId)
pub fn populate_derivation_dependencies(&mut self, drv_id: DerivationId)
Populate derivation dependencies by parsing its .drv file
pub fn get_derivation_info(&self, id: DerivationId) -> Option<&DerivationInfo>
pub fn get_derivation_info_mut( &mut self, id: DerivationId, ) -> Option<&mut DerivationInfo>
pub fn get_store_path_info(&self, id: StorePathId) -> Option<&StorePathInfo>
pub fn get_store_path_info_mut( &mut self, id: StorePathId, ) -> Option<&mut StorePathInfo>
pub fn update_build_status(&mut self, id: DerivationId, new_status: BuildStatus)
pub fn has_errors(&self) -> bool
pub fn total_builds(&self) -> usize
pub fn running_builds_for_host( &self, host: &Host, ) -> Vec<(DerivationId, &BuildInfo)>
Sourcepub fn has_platform_mismatch(&self, id: DerivationId) -> bool
pub fn has_platform_mismatch(&self, id: DerivationId) -> bool
Check if a derivation has a platform mismatch
Sourcepub fn platform_mismatches(&self) -> Vec<DerivationId> ⓘ
pub fn platform_mismatches(&self) -> Vec<DerivationId> ⓘ
Get all derivations with platform mismatches
Sourcepub fn get_activity_prefix(
&self,
activity_id: ActivityId,
prefix_style: &LogPrefixStyle,
use_color: bool,
) -> Option<String>
pub fn get_activity_prefix( &self, activity_id: ActivityId, prefix_style: &LogPrefixStyle, use_color: bool, ) -> Option<String>
Get the activity prefix for a given activity ID by walking up the parent
chain to find a Build activity and extracting its derivation name.
Returns a prefix like “hello> “ suitable for prepending to log lines.
If use_color is true and stderr is a TTY, the prefix will be blue.
The prefix_style determines whether to use short (pname only), full, or
no prefix.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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