Struct UbiEcinfoReq
#[repr(C)]pub struct UbiEcinfoReq<const N: usize> {
pub start: i32,
pub length: i32,
pub read_length: i32,
pub padding: [i8; 16],
pub erase_counters: [i32; N],
}Expand description
struct ubi_ecinfo_req: a request for the erase counters of a range of
physical eraseblocks.
In the kernel, erase_counters is a flexible array. Here it has N
entries, so the request and its counters are one buffer.
Fields§
§start: i32First physical eraseblock.
length: i32Number of erase counters to read, at most N.
read_length: i32Number of erase counters read, filled in by the kernel.
padding: [i8; 16]Reserved, must be 0.
erase_counters: [i32; N]Erase counters, filled in by the kernel. A bad block or an unknown erase counter is -1.
Implementations§
§impl<const N: usize> UbiEcinfoReq<N>
impl<const N: usize> UbiEcinfoReq<N>
pub const fn new() -> Self
pub const fn new() -> Self
Creates a request with all fields zero.
pub fn read_counters(&self) -> &[i32]
pub fn read_counters(&self) -> &[i32]
Returns the erase counters that the kernel read.
Trait Implementations§
§impl<const N: usize> Clone for UbiEcinfoReq<N>
impl<const N: usize> Clone for UbiEcinfoReq<N>
§fn clone(&self) -> UbiEcinfoReq<N>
fn clone(&self) -> UbiEcinfoReq<N>
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 moreimpl<const N: usize> Copy for UbiEcinfoReq<N>
§impl<const N: usize> Debug for UbiEcinfoReq<N>
impl<const N: usize> Debug for UbiEcinfoReq<N>
§impl<const N: usize> Default for UbiEcinfoReq<N>
impl<const N: usize> Default for UbiEcinfoReq<N>
impl<const N: usize> Eq for UbiEcinfoReq<N>
§impl<const N: usize> Hash for UbiEcinfoReq<N>
impl<const N: usize> Hash for UbiEcinfoReq<N>
§impl<const N: usize> PartialEq for UbiEcinfoReq<N>
impl<const N: usize> PartialEq for UbiEcinfoReq<N>
impl<const N: usize> StructuralPartialEq for UbiEcinfoReq<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for UbiEcinfoReq<N>
impl<const N: usize> RefUnwindSafe for UbiEcinfoReq<N>
impl<const N: usize> Send for UbiEcinfoReq<N>
impl<const N: usize> Sync for UbiEcinfoReq<N>
impl<const N: usize> Unpin for UbiEcinfoReq<N>
impl<const N: usize> UnsafeUnpin for UbiEcinfoReq<N>
impl<const N: usize> UnwindSafe for UbiEcinfoReq<N>
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