Create a repository status with pre-allocated capacity. # Arguments `view` - The current view name `state` - The Merkle state of the view `capacity` - Expected number of entries
(view: String, state: Option<Merkle>, capacity: usize)
| 475 | /// * `state` - The Merkle state of the view |
| 476 | /// * `capacity` - Expected number of entries |
| 477 | pub fn with_capacity(view: String, state: Option<Merkle>, capacity: usize) -> Self { |
| 478 | Self { |
| 479 | view, |
| 480 | state, |
| 481 | entries: Vec::with_capacity(capacity), |
| 482 | path_index: HashMap::with_capacity(capacity), |
| 483 | stale_index_count: 0, |
| 484 | verified_candidate_root: None, |
| 485 | change_source_fallback: None, |
| 486 | change_source_metrics: None, |
| 487 | notices: Vec::new(), |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | /// Get the current view name. |
| 492 | pub fn view(&self) -> &str { |
nothing calls this directly
no outgoing calls
no test coverage detected