#[repr(u8)]pub enum MozPrefFeatureValue<I> {
None,
Boolean(BoolValue),
Integer(I),
String(AtomString),
}
Expand description
Simple values we support for -moz-pref(). We don’t want to deal with calc() and other shenanigans for now.
Variants§
None
No pref value, implicitly bool, but also used to represent missing prefs.
Boolean(BoolValue)
A bool value.
Integer(I)
An integer value, useful for int prefs.
String(AtomString)
A string pref value.
Trait Implementations§
Source§impl<I: Clone> Clone for MozPrefFeatureValue<I>
impl<I: Clone> Clone for MozPrefFeatureValue<I>
Source§fn clone(&self) -> MozPrefFeatureValue<I>
fn clone(&self) -> MozPrefFeatureValue<I>
Returns a copy 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<I: Debug> Debug for MozPrefFeatureValue<I>
impl<I: Debug> Debug for MozPrefFeatureValue<I>
Source§impl<I> MallocSizeOf for MozPrefFeatureValue<I>where
I: MallocSizeOf,
impl<I> MallocSizeOf for MozPrefFeatureValue<I>where
I: MallocSizeOf,
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl<I> Parse for MozPrefFeatureValue<I>where
I: Parse,
impl<I> Parse for MozPrefFeatureValue<I>where
I: Parse,
Source§fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more
Source§impl<I: PartialEq> PartialEq for MozPrefFeatureValue<I>
impl<I: PartialEq> PartialEq for MozPrefFeatureValue<I>
Source§impl<I> SpecifiedValueInfo for MozPrefFeatureValue<I>where
I: SpecifiedValueInfo,
impl<I> SpecifiedValueInfo for MozPrefFeatureValue<I>where
I: SpecifiedValueInfo,
Source§const SUPPORTED_TYPES: u8
const SUPPORTED_TYPES: u8
Supported CssTypes by the given value type. Read more
Source§impl<I> ToComputedValue for MozPrefFeatureValue<I>where
I: ToComputedValue,
impl<I> ToComputedValue for MozPrefFeatureValue<I>where
I: ToComputedValue,
Source§type ComputedValue = MozPrefFeatureValue<<I as ToComputedValue>::ComputedValue>
type ComputedValue = MozPrefFeatureValue<<I as ToComputedValue>::ComputedValue>
The computed value type we’re going to be converted to.
Source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more
Source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.Source§impl<I> ToCss for MozPrefFeatureValue<I>where
I: ToCss,
impl<I> ToCss for MozPrefFeatureValue<I>where
I: ToCss,
Source§impl<I> ToShmem for MozPrefFeatureValue<I>where
I: ToShmem,
impl<I> ToShmem for MozPrefFeatureValue<I>where
I: ToShmem,
impl<I: Eq> Eq for MozPrefFeatureValue<I>
impl<I> StructuralPartialEq for MozPrefFeatureValue<I>
Auto Trait Implementations§
impl<I> Freeze for MozPrefFeatureValue<I>where
I: Freeze,
impl<I> RefUnwindSafe for MozPrefFeatureValue<I>where
I: RefUnwindSafe,
impl<I> Send for MozPrefFeatureValue<I>where
I: Send,
impl<I> Sync for MozPrefFeatureValue<I>where
I: Sync,
impl<I> Unpin for MozPrefFeatureValue<I>where
I: Unpin,
impl<I> UnwindSafe for MozPrefFeatureValue<I>where
I: 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§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
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert