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.
Trait Implementations§
source§impl<'a> PartialEq for Raid<'a>
impl<'a> PartialEq for Raid<'a>
impl<'a> Eq for Raid<'a>
impl<'a> StructuralPartialEq for Raid<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Raid<'a>
impl<'a> Send for Raid<'a>
impl<'a> Sync for Raid<'a>
impl<'a> Unpin for Raid<'a>
impl<'a> UnwindSafe for Raid<'a>
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