Struct linux_info::storage::Raid
source · pub struct Raid<'a> { /* private fields */ }Expand description
A raid device.
Implementations§
source§impl<'a> Raid<'a>
impl<'a> Raid<'a>
sourcepub fn values(&self) -> impl Iterator<Item = impl Iterator<Item = &'a str>>
pub fn values(&self) -> impl Iterator<Item = impl Iterator<Item = &'a str>>
Returns every line and their values with out the name.
sourcepub fn kind(&self) -> Option<&'a str>
pub fn kind(&self) -> Option<&'a str>
Returns the kind of raid device.
Maybe in the future will return an enum.
sourcepub fn devices(&self) -> impl Iterator<Item = (usize, &'a str)>
pub fn devices(&self) -> impl Iterator<Item = (usize, &'a str)>
Returns all devices (id, name) in this raid array.
sourcepub fn usable_blocks(&self) -> Option<usize>
pub fn usable_blocks(&self) -> Option<usize>
Returns all usable blocks.
sourcepub fn used_devices(&self) -> Option<usize>
pub fn used_devices(&self) -> Option<usize>
The amount of devices that are currently used. Should
be raid.used_devices()? == raid.devices().count().
sourcepub fn ideal_devices(&self) -> Option<usize>
pub fn ideal_devices(&self) -> Option<usize>
The amount of devices that would be ideal for this array configuration.