pub enum MotionPref {
Unknown,
Full,
Reduced,
}Expand description
The OS reduce-motion setting: Reduced is “the user asked for less
animation”, Full is “the user did not”, Unknown is “nobody asked the
OS”. Spelled as what the user wants rather than as a reduce_motion
boolean because the third reading has no place in a boolean, and a
missing answer is not the same as a “no”.
Pref because edit already means cosmic-text’s caret Motion by that
name, and a crate with two of them would be one letter of ambiguity in
every use. The field is system.motion and every binding spells it
motion; only Rust sees the longer type name.
Variants§
Implementations§
Source§impl MotionPref
impl MotionPref
Sourcepub const ALL: &'static [MotionPref]
pub const ALL: &'static [MotionPref]
Wire order, as Appearance::ALL.
pub fn name(self) -> &'static str
pub fn parse(name: &str) -> Option<MotionPref>
pub fn from_code(code: u32) -> Option<MotionPref>
Sourcepub fn is_reduced(self) -> bool
pub fn is_reduced(self) -> bool
Whether a view should skip or shorten decorative motion. Unknown
answers false: a host that cannot tell gets the animations it
would have had before this field existed.
Trait Implementations§
Source§impl Clone for MotionPref
impl Clone for MotionPref
Source§fn clone(&self) -> MotionPref
fn clone(&self) -> MotionPref
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MotionPref
Source§impl Debug for MotionPref
impl Debug for MotionPref
Source§impl Default for MotionPref
impl Default for MotionPref
Source§fn default() -> MotionPref
fn default() -> MotionPref
impl Eq for MotionPref
Source§impl PartialEq for MotionPref
impl PartialEq for MotionPref
impl StructuralPartialEq for MotionPref
Auto Trait Implementations§
impl Freeze for MotionPref
impl RefUnwindSafe for MotionPref
impl Send for MotionPref
impl Sync for MotionPref
impl Unpin for MotionPref
impl UnsafeUnpin for MotionPref
impl UnwindSafe for MotionPref
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.