[−][src]Struct conrod_core::text::font::Map
A collection of mappings from font::Id
s to rusttype::Font
s.
Implementations
impl Map
[src]
pub fn new() -> Self
[src]
Construct the new, empty Map
.
pub fn get(&self, id: Id) -> Option<&Font>
[src]
Borrow the rusttype::Font
associated with the given font::Id
.
pub fn insert(&mut self, font: Font) -> Id
[src]
Adds the given rusttype::Font
to the Map
and returns a unique Id
for it.
pub fn insert_from_file<P>(&mut self, path: P) -> Result<Id, Error> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Insert a single Font
into the map by loading it from the given file path.
pub fn ids(&self) -> Ids<'_>ⓘ
[src]
Produces an iterator yielding the Id
for each Font
within the Map
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnwindSafe for Map
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &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>,