zng_ext_font::font_features

Trait FontFeatureExclusiveSetState

Source
pub trait FontFeatureExclusiveSetState:
    Copy
    + PartialEq
    + 'static {
    // Required methods
    fn names() -> &'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.

Required Methods§

Source

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

All the names of features, must have more then one name.

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§