pub struct IntMap<T> { /* private fields */ }
Expand description
A mapping from a u8
to T
.
Printer capabilities represented with this type will generally involve
sending a key in this map as part of a command to the printer. For example,
for character fonts, sending [0x1b, b'M']
followed by 0x03
to the
printer selects “font D”, and correspondingly, profile.fonts.get(3)
will
return information about the printer’s “font D”, if it exists.
Implementations§
Source§impl<T> IntMap<T>
impl<T> IntMap<T>
Sourcepub const fn from_entries(entries: &[(u8, T)]) -> &Self
pub const fn from_entries(entries: &[(u8, T)]) -> &Self
Create an IntMap
from the given map entries.
§Panics
This function will panic if entries
is not ordered by the first field of the tuple, or has duplicates.
Sourcepub fn iter(&self) -> IntMapIter<'_, T> ⓘ
pub fn iter(&self) -> IntMapIter<'_, T> ⓘ
Returns an iterator over the entries of this map.
Trait Implementations§
Source§impl<T> Borrow<IntMap<T>> for OwnedIntMap<T>
impl<T> Borrow<IntMap<T>> for OwnedIntMap<T>
Source§impl<'a, T> IntoIterator for &'a IntMap<T>
impl<'a, T> IntoIterator for &'a IntMap<T>
Source§impl<T> ToOwned for IntMap<T>
impl<T> ToOwned for IntMap<T>
Source§type Owned = OwnedIntMap<T>
type Owned = OwnedIntMap<T>
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more