Skip to main content

UbiEcinfoReq

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: i32

First physical eraseblock.

§length: i32

Number of erase counters to read, at most N.

§read_length: i32

Number 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>

pub const fn new() -> Self

Creates a request with all fields zero.

pub fn read_counters(&self) -> &[i32]

Returns the erase counters that the kernel read.

Trait Implementations§

§

impl<const N: usize> Clone for 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)

Performs copy-assignment from source. Read more
§

impl<const N: usize> Copy for UbiEcinfoReq<N>

§

impl<const N: usize> Debug for UbiEcinfoReq<N>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl<const N: usize> Default for UbiEcinfoReq<N>

§

fn default() -> Self

Returns the “default value” for a type. Read more
§

impl<const N: usize> Eq for UbiEcinfoReq<N>

§

impl<const N: usize> Hash for UbiEcinfoReq<N>

§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<const N: usize> PartialEq for UbiEcinfoReq<N>

§

fn eq(&self, other: &UbiEcinfoReq<N>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
§

impl<const N: usize> StructuralPartialEq for UbiEcinfoReq<N>

Auto Trait Implementations§

§

impl<const N: usize> Freeze for UbiEcinfoReq<N>
where [i32; N]: Freeze,

§

impl<const N: usize> RefUnwindSafe for UbiEcinfoReq<N>
where [i32; N]: RefUnwindSafe,

§

impl<const N: usize> Send for UbiEcinfoReq<N>
where [i32; N]: Send,

§

impl<const N: usize> Sync for UbiEcinfoReq<N>
where [i32; N]: Sync,

§

impl<const N: usize> Unpin for UbiEcinfoReq<N>
where [i32; N]: Unpin,

§

impl<const N: usize> UnsafeUnpin for UbiEcinfoReq<N>
where [i32; N]: UnsafeUnpin,

§

impl<const N: usize> UnwindSafe for UbiEcinfoReq<N>
where [i32; N]: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.