Struct VolumeInfo
pub struct VolumeInfo {
pub name: String,
pub kind: VolumeKind,
pub alignment: u32,
pub data_bytes: u64,
pub reserved_lebs: u32,
pub leb_size: u32,
pub corrupted: bool,
}Available on crate feature
linux and (Android or Linux) only.Expand description
Attributes of a UBI volume, read from sysfs.
Fields§
§name: StringName of the volume.
kind: VolumeKindType of the volume.
alignment: u32Alignment of the volume.
data_bytes: u64Bytes of data stored in the volume. For VolumeKind::Dynamic this
equals VolumeInfo::reserved_bytes.
reserved_lebs: u32Logical eraseblocks reserved for the volume.
leb_size: u32Usable bytes of a logical eraseblock. This can be less than the device’s logical eraseblock size because of the alignment.
corrupted: boolWhether the volume is corrupted.
Implementations§
§impl VolumeInfo
impl VolumeInfo
pub(crate) fn read(device: u32, volume: u32) -> Result<Self, DeviceError>
pub(crate) fn read(device: u32, volume: u32) -> Result<Self, DeviceError>
Reads the attributes of volume volume on UBI device device.
pub fn reserved_bytes(&self) -> u64
pub fn reserved_bytes(&self) -> u64
Returns the bytes reserved for the volume.
Trait Implementations§
§impl Clone for VolumeInfo
impl Clone for VolumeInfo
§fn clone(&self) -> VolumeInfo
fn clone(&self) -> VolumeInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for VolumeInfo
impl Debug for VolumeInfo
impl Eq for VolumeInfo
§impl PartialEq for VolumeInfo
impl PartialEq for VolumeInfo
impl StructuralPartialEq for VolumeInfo
Auto Trait Implementations§
impl Freeze for VolumeInfo
impl RefUnwindSafe for VolumeInfo
impl Send for VolumeInfo
impl Sync for VolumeInfo
impl Unpin for VolumeInfo
impl UnsafeUnpin for VolumeInfo
impl UnwindSafe for VolumeInfo
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