Information

Struct Information 

Source
pub struct Information {
    pub magic: u32,
    pub timestamp: u32,
    pub date: String<DATE_LEN>,
    pub version: String<VERSION_LEN>,
    pub length: u32,
}
Expand description

Firmware information.

Fields§

§magic: u32

Magic bytes value.

§timestamp: u32

The time stamp of the firmware.

§date: String<DATE_LEN>

The date of the firmware as a string.

§version: String<VERSION_LEN>

Version of the firmware as a string.

§length: u32

The length of the firmware, in bytes.

Implementations§

Source§

impl Information

Source

pub const MAGIC_MONO: u32 = 1_346_458_451u32

Magic constant for mono devices.

Source

pub const MAGIC_COLOR: u32 = 1_397_965_136u32

Magic constant for color devices.

Source

pub const LEN: usize = 34usize

The size of this structure when serialized, in bytes.

Source

pub fn serialize(&self) -> [u8; 34]

Serialize the structure.

Trait Implementations§

Source§

impl Debug for Information

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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.