pub struct Banner<'a> { /* private fields */ }Expand description
Banner for displaying an icon and title on the home menu. This is the raw struct, see the plain one here.
Implementations§
Source§impl<'a> Banner<'a>
impl<'a> Banner<'a>
Sourcepub fn new(version: BannerVersion) -> Self
pub fn new(version: BannerVersion) -> Self
Creates a new Banner.
Sourcepub fn borrow_from_slice(data: &'a [u8]) -> Result<Self, RawBannerError>
pub fn borrow_from_slice(data: &'a [u8]) -> Result<Self, RawBannerError>
Sourcepub fn version(&self) -> BannerVersion
pub fn version(&self) -> BannerVersion
Returns the version of this Banner.
Sourcepub fn crc_mut(&mut self, index: usize) -> &mut u16
pub fn crc_mut(&mut self, index: usize) -> &mut u16
Returns a mutable CRC checksum at the given index.
Sourcepub fn bitmap(&self) -> &BannerBitmap
pub fn bitmap(&self) -> &BannerBitmap
Returns a reference to the bitmap of this Banner.
Sourcepub fn bitmap_mut(&mut self) -> &mut BannerBitmap
pub fn bitmap_mut(&mut self) -> &mut BannerBitmap
Returns a mutable reference to the bitmap of this Banner.
Sourcepub fn palette(&self) -> &BannerPalette
pub fn palette(&self) -> &BannerPalette
Returns a reference to the palette of this Banner.
Sourcepub fn palette_mut(&mut self) -> &mut BannerPalette
pub fn palette_mut(&mut self) -> &mut BannerPalette
Returns a mutable reference to the palette of this Banner.
Sourcepub fn title(&self, language: Language) -> Option<&Unicode16Array<0x80>>
pub fn title(&self, language: Language) -> Option<&Unicode16Array<0x80>>
Returns a title for the given language, or None the language is not supported by this banner version.
Sourcepub fn title_mut(
&mut self,
language: Language,
) -> Option<&mut Unicode16Array<0x80>>
pub fn title_mut( &mut self, language: Language, ) -> Option<&mut Unicode16Array<0x80>>
Returns a mutable title for the given language, or None the language is not supported by this banner version.
Sourcepub fn animation(&self) -> Option<&BannerAnimation>
pub fn animation(&self) -> Option<&BannerAnimation>
Returns a reference to the animation of this Banner, if it exists in this banner version.
Sourcepub fn animation_mut(&mut self) -> Option<&mut BannerAnimation>
pub fn animation_mut(&mut self) -> Option<&mut BannerAnimation>
Returns a mutable reference to the animation of this Banner, if it exists in this banner version.
Sourcepub fn display(&self, indent: usize) -> DisplayBanner<'_>
pub fn display(&self, indent: usize) -> DisplayBanner<'_>
Creates a DisplayBanner which implements Display.