[][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 Clone for AppInfo[src]

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

Performs copy-assignment from source. Read more

impl Copy for AppInfo[src]

impl Debug for AppInfo[src]

Auto Trait Implementations

impl Sync for AppInfo

impl Send for AppInfo

impl Unpin for AppInfo

impl RefUnwindSafe for AppInfo

impl UnwindSafe for AppInfo

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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