[−][src]Struct gbl::AppInfo
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]
type_: u32,
version: u32,
capabilities: u32,
product_id: Uuid
) -> Self
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(&self) -> 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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,