pub struct PreviewSources {
pub env: PreviewFeatures,
pub config: PreviewFeatures,
pub option: PreviewFeatures,
}Expand description
The preview opt-in’s resolved sources (ADR-0719 decision 3): the
three additive carriers, kept per-set so the resolved surface can
report which source enabled each feature. The union is derived —
never stored beside its parts — so the parts and the whole cannot
drift: every gate reads Self::union, and SHOW SETTINGS
(ADR-0719 decision 6) reads Self::carriers for the provenance it
reports.
Fields§
§env: PreviewFeaturesPreviewSource::Env’s set.
config: PreviewFeaturesPreviewSource::Config’s set.
option: PreviewFeaturesPreviewSource::Option’s set.
Implementations§
Source§impl PreviewSources
impl PreviewSources
Sourcepub fn union(&self) -> PreviewFeatures
pub fn union(&self) -> PreviewFeatures
The three sources’ additive union (ADR-0719 decision 3) — the resolved set every gate reads, derived here so it is never stored beside the parts it comes from.
Sourcepub fn carriers(
&self,
feature: PreviewFeature,
) -> impl Iterator<Item = PreviewSource>
pub fn carriers( &self, feature: PreviewFeature, ) -> impl Iterator<Item = PreviewSource>
The carriers that enabled feature, in Self::parts’ order —
the provenance SHOW SETTINGS reports. Empty exactly when the
union has the feature off.
Trait Implementations§
Source§impl Clone for PreviewSources
impl Clone for PreviewSources
impl Copy for PreviewSources
Source§impl Debug for PreviewSources
impl Debug for PreviewSources
Source§impl Default for PreviewSources
impl Default for PreviewSources
impl Eq for PreviewSources
Source§impl PartialEq for PreviewSources
impl PartialEq for PreviewSources
impl StructuralPartialEq for PreviewSources
Auto Trait Implementations§
impl Forget for PreviewSources
impl Freeze for PreviewSources
impl Move for PreviewSources
impl RefUnwindSafe for PreviewSources
impl Send for PreviewSources
impl Sync for PreviewSources
impl Unpin for PreviewSources
impl UnsafeUnpin for PreviewSources
impl UnwindSafe for PreviewSources
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
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
key and return true if they are equal.