[][src]Struct sensehat_screen::fonts::FontCollection

pub struct FontCollection(_);

Implementations

impl FontCollection[src]

pub fn new() -> Self[src]

Create a default FontCollection, containing the Unicode constants from the font8x8 crate, except for MISC_FONTS, and SGA_FONTS (which are non-standard).

pub fn from_hashmap(hashmap: HashMap<char, FontUnicode>) -> Self[src]

Create a FontCollection with a custom HashMap of font symbols.

pub fn get(&self, symbol: char) -> Option<&FontUnicode>[src]

Get an Option with the symbol's byte rendering.

pub fn contains_key(&self, symbol: char) -> bool[src]

Search if collection has a symbol by its unicode key.

pub fn sanitize_str(&self, s: &str) -> Result<FontString, ScreenError>[src]

Sanitize a &str and create a new FontString.

Trait Implementations

impl Clone for FontCollection[src]

impl Debug for FontCollection[src]

impl Default for FontCollection[src]

impl PartialEq<FontCollection> for FontCollection[src]

impl StructuralPartialEq for FontCollection[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.