pub struct GlyphSourcePreference {
pub prefer: Vec<GlyphSource>,
pub deny: HashSet<GlyphSource>,
}Expand description
Preference ordering and deny list for glyph sources
Fields§
§prefer: Vec<GlyphSource>§deny: HashSet<GlyphSource>Implementations§
Source§impl GlyphSourcePreference
impl GlyphSourcePreference
Sourcepub fn from_parts(
prefer: Vec<GlyphSource>,
deny: impl IntoIterator<Item = GlyphSource>,
) -> Self
pub fn from_parts( prefer: Vec<GlyphSource>, deny: impl IntoIterator<Item = GlyphSource>, ) -> Self
Build a preference list with an optional deny set.
- Empty
preferuses the default outline-first order. - Duplicates are removed while keeping first-seen order.
- Denied sources are removed from the preferred list.
Sourcepub fn effective_order(&self) -> Vec<GlyphSource>
pub fn effective_order(&self) -> Vec<GlyphSource>
Effective order with current denies applied.
Trait Implementations§
Source§impl Clone for GlyphSourcePreference
impl Clone for GlyphSourcePreference
Source§fn clone(&self) -> GlyphSourcePreference
fn clone(&self) -> GlyphSourcePreference
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlyphSourcePreference
impl Debug for GlyphSourcePreference
Source§impl Default for GlyphSourcePreference
impl Default for GlyphSourcePreference
Source§impl PartialEq for GlyphSourcePreference
impl PartialEq for GlyphSourcePreference
impl Eq for GlyphSourcePreference
impl StructuralPartialEq for GlyphSourcePreference
Auto Trait Implementations§
impl Freeze for GlyphSourcePreference
impl RefUnwindSafe for GlyphSourcePreference
impl Send for GlyphSourcePreference
impl Sync for GlyphSourcePreference
impl Unpin for GlyphSourcePreference
impl UnsafeUnpin for GlyphSourcePreference
impl UnwindSafe for GlyphSourcePreference
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.