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_named(source: &str, raw: &str) -> Result<Self, Error>
pub fn parse_named(source: &str, raw: &str) -> Result<Self, Error>
Parse one opt-in value — the single grammar every preview
source shares (ADR-0719): the RELATE_PREVIEW environment
variable, the store-committed relate.yaml preview: list,
and the typed OpenOptions.preview field all resolve through
here, each naming its own source in a failure. 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 from_names<'a>(
source: &str,
names: impl IntoIterator<Item = &'a str>,
) -> Result<Self, Error>
pub fn from_names<'a>( source: &str, names: impl IntoIterator<Item = &'a str>, ) -> Result<Self, Error>
Resolve already-separated feature names — the per-name half of
the one grammar, for a source whose names arrive as a typed list
(the store-committed relate.yaml preview: sequence, ADR-0719)
rather than one comma string. Every name resolves against the
registry or the whole call fails naming source and the known
names; an empty name is an unknown name, never a silent skip. No
names enables nothing.
Sourcepub fn parse_optional(source: &str, raw: Option<&str>) -> Result<Self, Error>
pub fn parse_optional(source: &str, raw: Option<&str>) -> Result<Self, Error>
An optional surface parameter — absent opts into nothing, present
parses with Self::parse_named. The one statement of the
“optional opt-in” rule the binding surfaces (the wasm and Python
parameters) share; each keeps only its own error mapping.
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.