Find the EFI System Partition (ESP) among children, or error if absent. This is a convenience wrapper around [`Self::find_partition_of_esp_optional`] for callers that require an ESP to be present.
(&self)
| 289 | /// This is a convenience wrapper around [`Self::find_partition_of_esp_optional`] |
| 290 | /// for callers that require an ESP to be present. |
| 291 | pub fn find_partition_of_esp(&self) -> Result<&Device> { |
| 292 | self.find_partition_of_esp_optional()? |
| 293 | .ok_or_else(|| anyhow!("ESP partition not found on {}", self.path())) |
| 294 | } |
| 295 | |
| 296 | /// Find a child partition by partition number (1-indexed). |
| 297 | pub fn find_device_by_partno(&self, partno: u32) -> Result<&Device> { |