Struct sensehat_screen::fonts::FontCollection [−][src]
pub struct FontCollection(_);
Methods
impl FontCollection[src]
impl FontCollectionpub fn new() -> Self[src]
pub fn new() -> SelfCreate 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]
pub fn from_hashmap(hashmap: HashMap<char, FontUnicode>) -> SelfCreate a FontCollection with a custom HashMap of font symbols.
pub fn get(&self, symbol: char) -> Option<&FontUnicode>[src]
pub fn get(&self, symbol: char) -> Option<&FontUnicode>Get an Option with the symbol's byte rendering.
pub fn contains_key(&self, symbol: char) -> bool[src]
pub fn contains_key(&self, symbol: char) -> boolSearch if collection has a symbol by its unicode key.
pub fn sanitize_str(&self, s: &str) -> Result<FontString, ScreenError>[src]
pub fn sanitize_str(&self, s: &str) -> Result<FontString, ScreenError>Sanitize a &str and create a new FontString.
Trait Implementations
impl Clone for FontCollection[src]
impl Clone for FontCollectionfn clone(&self) -> FontCollection[src]
fn clone(&self) -> FontCollectionReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Debug for FontCollection[src]
impl Debug for FontCollectionfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for FontCollection[src]
impl PartialEq for FontCollectionfn eq(&self, other: &FontCollection) -> bool[src]
fn eq(&self, other: &FontCollection) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &FontCollection) -> bool[src]
fn ne(&self, other: &FontCollection) -> boolThis method tests for !=.
impl Default for FontCollection[src]
impl Default for FontCollectionAuto Trait Implementations
impl Send for FontCollection
impl Send for FontCollectionimpl Sync for FontCollection
impl Sync for FontCollection