pub struct DiscussionFeatures(/* private fields */);Expand description
Feature flags gating optional Discussion surfaces.
Implementations§
Source§impl DiscussionFeatures
impl DiscussionFeatures
pub const ATTACHMENTS: DiscussionFeatures
pub const MARKDOWN: DiscussionFeatures
pub const CITATIONS: DiscussionFeatures
pub const CUSTOM_PARTS: DiscussionFeatures
pub const FOCUS_NAVIGATION: DiscussionFeatures
pub const AGENT_PARTS: DiscussionFeatures
Source§impl DiscussionFeatures
impl DiscussionFeatures
Sourcepub const fn empty() -> DiscussionFeatures
pub const fn empty() -> DiscussionFeatures
Get a flags value with all bits unset.
Sourcepub const fn all() -> DiscussionFeatures
pub const fn all() -> DiscussionFeatures
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<DiscussionFeatures>
pub const fn from_bits(bits: u32) -> Option<DiscussionFeatures>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> DiscussionFeatures
pub const fn from_bits_truncate(bits: u32) -> DiscussionFeatures
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> DiscussionFeatures
pub const fn from_bits_retain(bits: u32) -> DiscussionFeatures
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<DiscussionFeatures>
pub fn from_name(name: &str) -> Option<DiscussionFeatures>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: DiscussionFeatures) -> bool
pub const fn intersects(&self, other: DiscussionFeatures) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: DiscussionFeatures) -> bool
pub const fn contains(&self, other: DiscussionFeatures) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn insert(&mut self, other: DiscussionFeatures)
pub fn insert(&mut self, other: DiscussionFeatures)
The bitwise or (|) of the bits in self and other.
Sourcepub fn remove(&mut self, other: DiscussionFeatures)
pub fn remove(&mut self, other: DiscussionFeatures)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: DiscussionFeatures)
pub fn toggle(&mut self, other: DiscussionFeatures)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: DiscussionFeatures, value: bool)
pub fn set(&mut self, other: DiscussionFeatures, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: DiscussionFeatures) -> DiscussionFeatures
pub const fn intersection(self, other: DiscussionFeatures) -> DiscussionFeatures
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: DiscussionFeatures) -> DiscussionFeatures
pub const fn union(self, other: DiscussionFeatures) -> DiscussionFeatures
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: DiscussionFeatures) -> DiscussionFeatures
pub const fn difference(self, other: DiscussionFeatures) -> DiscussionFeatures
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(
self,
other: DiscussionFeatures,
) -> DiscussionFeatures
pub const fn symmetric_difference( self, other: DiscussionFeatures, ) -> DiscussionFeatures
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> DiscussionFeatures
pub const fn complement(self) -> DiscussionFeatures
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl DiscussionFeatures
impl DiscussionFeatures
Sourcepub const fn iter(&self) -> Iter<DiscussionFeatures> ⓘ
pub const fn iter(&self) -> Iter<DiscussionFeatures> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<DiscussionFeatures> ⓘ
pub const fn iter_names(&self) -> IterNames<DiscussionFeatures> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Source§impl DiscussionFeatures
impl DiscussionFeatures
Sourcepub fn default_enabled() -> DiscussionFeatures
pub fn default_enabled() -> DiscussionFeatures
Default feature set for Phase 0+ thread navigation.
Trait Implementations§
Source§impl Binary for DiscussionFeatures
impl Binary for DiscussionFeatures
Source§impl BitAnd for DiscussionFeatures
impl BitAnd for DiscussionFeatures
Source§fn bitand(self, other: DiscussionFeatures) -> DiscussionFeatures
fn bitand(self, other: DiscussionFeatures) -> DiscussionFeatures
The bitwise and (&) of the bits in self and other.
Source§type Output = DiscussionFeatures
type Output = DiscussionFeatures
& operator.Source§impl BitAndAssign for DiscussionFeatures
impl BitAndAssign for DiscussionFeatures
Source§fn bitand_assign(&mut self, other: DiscussionFeatures)
fn bitand_assign(&mut self, other: DiscussionFeatures)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for DiscussionFeatures
impl BitOr for DiscussionFeatures
Source§fn bitor(self, other: DiscussionFeatures) -> DiscussionFeatures
fn bitor(self, other: DiscussionFeatures) -> DiscussionFeatures
The bitwise or (|) of the bits in self and other.
Source§type Output = DiscussionFeatures
type Output = DiscussionFeatures
| operator.Source§impl BitOrAssign for DiscussionFeatures
impl BitOrAssign for DiscussionFeatures
Source§fn bitor_assign(&mut self, other: DiscussionFeatures)
fn bitor_assign(&mut self, other: DiscussionFeatures)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for DiscussionFeatures
impl BitXor for DiscussionFeatures
Source§fn bitxor(self, other: DiscussionFeatures) -> DiscussionFeatures
fn bitxor(self, other: DiscussionFeatures) -> DiscussionFeatures
The bitwise exclusive-or (^) of the bits in self and other.
Source§type Output = DiscussionFeatures
type Output = DiscussionFeatures
^ operator.Source§impl BitXorAssign for DiscussionFeatures
impl BitXorAssign for DiscussionFeatures
Source§fn bitxor_assign(&mut self, other: DiscussionFeatures)
fn bitxor_assign(&mut self, other: DiscussionFeatures)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for DiscussionFeatures
impl Clone for DiscussionFeatures
Source§fn clone(&self) -> DiscussionFeatures
fn clone(&self) -> DiscussionFeatures
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 DiscussionFeatures
Source§impl Debug for DiscussionFeatures
impl Debug for DiscussionFeatures
Source§impl Default for DiscussionFeatures
impl Default for DiscussionFeatures
Source§fn default() -> DiscussionFeatures
fn default() -> DiscussionFeatures
impl Eq for DiscussionFeatures
Source§impl Extend<DiscussionFeatures> for DiscussionFeatures
impl Extend<DiscussionFeatures> for DiscussionFeatures
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = DiscussionFeatures>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = DiscussionFeatures>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for DiscussionFeatures
impl Flags for DiscussionFeatures
Source§const FLAGS: &'static [Flag<DiscussionFeatures>]
const FLAGS: &'static [Flag<DiscussionFeatures>]
Source§fn from_bits_retain(bits: u32) -> DiscussionFeatures
fn from_bits_retain(bits: u32) -> DiscussionFeatures
Source§fn all_named() -> DiscussionFeatures
fn all_named() -> DiscussionFeatures
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<DiscussionFeatures> for DiscussionFeatures
impl FromIterator<DiscussionFeatures> for DiscussionFeatures
Source§fn from_iter<T>(iterator: T) -> DiscussionFeatureswhere
T: IntoIterator<Item = DiscussionFeatures>,
fn from_iter<T>(iterator: T) -> DiscussionFeatureswhere
T: IntoIterator<Item = DiscussionFeatures>,
The bitwise or (|) of the bits in each flags value.
Source§impl Hash for DiscussionFeatures
impl Hash for DiscussionFeatures
Source§impl IntoIterator for DiscussionFeatures
impl IntoIterator for DiscussionFeatures
Source§type Item = DiscussionFeatures
type Item = DiscussionFeatures
Source§type IntoIter = Iter<DiscussionFeatures>
type IntoIter = Iter<DiscussionFeatures>
Source§fn into_iter(self) -> <DiscussionFeatures as IntoIterator>::IntoIter
fn into_iter(self) -> <DiscussionFeatures as IntoIterator>::IntoIter
Source§impl LowerHex for DiscussionFeatures
impl LowerHex for DiscussionFeatures
Source§impl Not for DiscussionFeatures
impl Not for DiscussionFeatures
Source§fn not(self) -> DiscussionFeatures
fn not(self) -> DiscussionFeatures
The bitwise negation (!) of the bits in self, truncating the result.
Source§type Output = DiscussionFeatures
type Output = DiscussionFeatures
! operator.Source§impl Octal for DiscussionFeatures
impl Octal for DiscussionFeatures
Source§impl PartialEq for DiscussionFeatures
impl PartialEq for DiscussionFeatures
impl StructuralPartialEq for DiscussionFeatures
Source§impl Sub for DiscussionFeatures
impl Sub for DiscussionFeatures
Source§fn sub(self, other: DiscussionFeatures) -> DiscussionFeatures
fn sub(self, other: DiscussionFeatures) -> DiscussionFeatures
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = DiscussionFeatures
type Output = DiscussionFeatures
- operator.Source§impl SubAssign for DiscussionFeatures
impl SubAssign for DiscussionFeatures
Source§fn sub_assign(&mut self, other: DiscussionFeatures)
fn sub_assign(&mut self, other: DiscussionFeatures)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Auto Trait Implementations§
impl Freeze for DiscussionFeatures
impl RefUnwindSafe for DiscussionFeatures
impl Send for DiscussionFeatures
impl Sync for DiscussionFeatures
impl Unpin for DiscussionFeatures
impl UnsafeUnpin for DiscussionFeatures
impl UnwindSafe for DiscussionFeatures
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
Source§type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
Source§fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T, C> ComponentsInto<C> for T
impl<T, C> ComponentsInto<C> for T
Source§fn components_into(self) -> C
fn components_into(self) -> C
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
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> ⓘ
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> ⓘ
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<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
fn into_element_maybe_signal(self) -> ElementMaybeSignal<T>
Source§impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
fn into_elements_maybe_signal(self) -> ElementsMaybeSignal<T>
Source§impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T, Js, C> IntoElementsMaybeSignalType<T, Vec<Element>> for C
impl<T, Js, C> IntoElementsMaybeSignalType<T, Vec<Element>> for C
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more