pub struct PreviewFeatures(/* private fields */);Expand description
The set of preview features enabled by RELATE_PREVIEW for one
open store. Empty (PreviewFeatures::none) disables every gated
feature.
Implementations§
Source§impl PreviewFeatures
impl PreviewFeatures
Sourcepub fn parse(raw: &str) -> Result<Self, Error>
pub fn parse(raw: &str) -> Result<Self, Error>
Parse one RELATE_PREVIEW value: a comma-separated list of
kebab-case feature names, whitespace tolerated around each name.
An empty or blank value enables nothing. An unknown name (including
an empty list segment) is a loud usage error naming the known
names — fail-closed, never silently ignored.
Sourcepub fn enabled(self, feature: PreviewFeature) -> bool
pub fn enabled(self, feature: PreviewFeature) -> bool
Whether feature is enabled for this store — the typed gate
predicate a gated feature checks where it would otherwise be parsed
or dispatched.
Sourcepub fn with_feature(self, feature: PreviewFeature) -> Self
pub fn with_feature(self, feature: PreviewFeature) -> Self
The set enabling every feature one by one, over an existing value: the fixture constructor the gate tests build from the tables that own the rows, so a new gated name is added in one place.
Trait Implementations§
Source§impl Clone for PreviewFeatures
impl Clone for PreviewFeatures
impl Copy for PreviewFeatures
Source§impl Debug for PreviewFeatures
impl Debug for PreviewFeatures
Source§impl Default for PreviewFeatures
The fail-closed empty set: the value a store-level service bundle
carries until open installs the resolved RELATE_PREVIEW set
(ADR-0371, ADR-0378), so an executor-only Graph::default() gates every
preview feature closed.
impl Default for PreviewFeatures
The fail-closed empty set: the value a store-level service bundle
carries until open installs the resolved RELATE_PREVIEW set
(ADR-0371, ADR-0378), so an executor-only Graph::default() gates every
preview feature closed.
impl Eq for PreviewFeatures
Source§impl PartialEq for PreviewFeatures
impl PartialEq for PreviewFeatures
impl StructuralPartialEq for PreviewFeatures
Auto Trait Implementations§
impl Forget for PreviewFeatures
impl Freeze for PreviewFeatures
impl Move for PreviewFeatures
impl RefUnwindSafe for PreviewFeatures
impl Send for PreviewFeatures
impl Sync for PreviewFeatures
impl Unpin for PreviewFeatures
impl UnsafeUnpin for PreviewFeatures
impl UnwindSafe for PreviewFeatures
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.