pub struct Setting<T> {
pub selector: Tag,
pub value: T,
}
Expand description
Setting defined by a selector tag and an associated value.
This type is a generic container for properties that can be activated
or defined by a (Tag, T)
pair where the tag selects the target
setting and the generic value of type T
specifies the value for that
setting.
§Usage
Current usage is for specifying variation axis settings (similar to the
CSS property font-variation-settings).
See VariationSetting
.
In the future, this will likely also be used for specifying feature settings (analogous to the CSS property font-feature-settings) for selecting OpenType features.
Fields§
§selector: Tag
Tag that specifies the target setting.
value: T
The desired value for the setting.
Implementations§
Trait Implementations§
source§impl<T: Ord> Ord for Setting<T>
impl<T: Ord> Ord for Setting<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialOrd> PartialOrd for Setting<T>
impl<T: PartialOrd> PartialOrd for Setting<T>
impl<T: Copy> Copy for Setting<T>
impl<T: Eq> Eq for Setting<T>
impl<T> StructuralPartialEq for Setting<T>
Auto Trait Implementations§
impl<T> Freeze for Setting<T>where
T: Freeze,
impl<T> RefUnwindSafe for Setting<T>where
T: RefUnwindSafe,
impl<T> Send for Setting<T>where
T: Send,
impl<T> Sync for Setting<T>where
T: Sync,
impl<T> Unpin for Setting<T>where
T: Unpin,
impl<T> UnwindSafe for Setting<T>where
T: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)