pub struct Inventory { /* private fields */ }Expand description
An in-memory inventory of test nodes.
Implementations§
Source§impl Inventory
impl Inventory
Sourcepub fn get_mut(&mut self, node_id: &str) -> Option<&mut TestNode>
pub fn get_mut(&mut self, node_id: &str) -> Option<&mut TestNode>
Get a mutable reference to a test node by ID.
Sourcepub fn node_ids(&self) -> Vec<&TestNodeId> ⓘ
pub fn node_ids(&self) -> Vec<&TestNodeId> ⓘ
Get all node IDs.
Sourcepub fn meta(&self) -> &InventoryMeta
pub fn meta(&self) -> &InventoryMeta
Get the inventory metadata.
Sourcepub fn update_meta(&mut self, hash: String, collected_at: u64)
pub fn update_meta(&mut self, hash: String, collected_at: u64)
Update metadata after collection.
Sourcepub fn filter_by_keyword(&self, expr: &str) -> Vec<&TestNode>
pub fn filter_by_keyword(&self, expr: &str) -> Vec<&TestNode>
Filter nodes by keyword expression (-k).
Sourcepub fn filter_by_marker(&self, expr: &str) -> Vec<&TestNode>
pub fn filter_by_marker(&self, expr: &str) -> Vec<&TestNode>
Filter nodes by marker expression (-m).
Sourcepub fn filter(
&self,
keyword: Option<&str>,
marker: Option<&str>,
) -> Vec<&TestNode>
pub fn filter( &self, keyword: Option<&str>, marker: Option<&str>, ) -> Vec<&TestNode>
Filter nodes by both keyword and marker.
Sourcepub fn sorted_by_duration(&self) -> Vec<&TestNode>
pub fn sorted_by_duration(&self) -> Vec<&TestNode>
Get nodes sorted by historical duration (longest first).
Sourcepub fn sorted_by_failure_rate(&self) -> Vec<&TestNode>
pub fn sorted_by_failure_rate(&self) -> Vec<&TestNode>
Get nodes sorted by failure rate (most flaky first).
Sourcepub fn save<S: StorageBackend>(
&self,
storage: &S,
context_id: &str,
) -> StorageResult<()>
pub fn save<S: StorageBackend>( &self, storage: &S, context_id: &str, ) -> StorageResult<()>
Save the inventory to storage.
Sourcepub fn load<S: StorageBackend>(
storage: &S,
context_id: &str,
) -> StorageResult<Self>
pub fn load<S: StorageBackend>( storage: &S, context_id: &str, ) -> StorageResult<Self>
Load the inventory from storage.
Sourcepub fn clear_storage<S: StorageBackend>(
storage: &S,
context_id: &str,
) -> StorageResult<()>
pub fn clear_storage<S: StorageBackend>( storage: &S, context_id: &str, ) -> StorageResult<()>
Clear the inventory for a context from storage.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Inventory
impl RefUnwindSafe for Inventory
impl Send for Inventory
impl Sync for Inventory
impl Unpin for Inventory
impl UnwindSafe for Inventory
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