[][src]Struct gbl::AppInfo

pub struct AppInfo { /* fields omitted */ }

An application info structure.

This structure is generally ignored by the bootloader and can be used to implement custom checks. For example, the version field can be used to encode the firmware revision and prevent firmware downgrades.

Can be passed to Gbl::from_parts to create a fully custom GBL container.

Methods

impl AppInfo[src]

pub fn new(
    type_: u32,
    version: u32,
    capabilities: u32,
    product_id: Uuid
) -> Self
[src]

Creates a new application info section from its raw components.

Note that these values are basically ignored by the bootloader, but can be used by the application before initiating a firmware upgrade.

Parameters

  • type_: Type of the application (might be a bitfield).
  • version: App version (can be used to prevent firmware downgrades).
  • capabilities: Capability bitfield (can be used for anything).
  • product_id: A UUID identifying the application.

pub fn type_(&self) -> u32[src]

Returns the application type field.

pub fn version(&self) -> u32[src]

Returns the app version field.

pub fn capabilities(&self) -> u32[src]

Returns the capabilities field.

pub fn product_id(&self) -> Uuid[src]

Returns the product ID field.

Trait Implementations

impl Copy for AppInfo[src]

impl Clone for AppInfo[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for AppInfo[src]

Auto Trait Implementations

impl Send for AppInfo

impl Sync for AppInfo

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]