zng::font::font_features

Trait FontFeatureExclusiveSetsState

source
pub trait FontFeatureExclusiveSetsState:
    Copy
    + PartialEq
    + 'static {
    // Required methods
    fn names() -> &'static [&'static [FontFeatureName]];
    fn variant(self) -> Option<u32>;
    fn from_variant(v: u32) -> Self;
    fn auto() -> Self;
}
Expand description

Represents enum like types that represents a exclusive set of features + Auto. Some variants can have multiple features.

Required Methods§

source

fn names() -> &'static [&'static [FontFeatureName]]

All the names of features, must have more then one sub-set.

source

fn variant(self) -> Option<u32>

None if Auto or Some(NonZeroUsize) if is a feature.

source

fn from_variant(v: u32) -> Self

New from feature variant.

Returns Auto if v == 0 || v > Self::names().len().

source

fn auto() -> Self

New Auto.

Object Safety§

This trait is not object safe.

Implementors§