Enum PreviewFeature
#[non_exhaustive]pub enum PreviewFeature {
TestInfra,
}Expand description
A preview feature that can be enabled with --preview.
Preview features are in-progress language additions that:
- May change or be removed before stabilization
- Require explicit opt-in via
--preview <feature> - Allow incremental implementation to be merged to main
See ADR-0005 for the full design.
When all preview features are stabilized, this enum may be empty. New preview features are added here as development begins.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TestInfra
Testing infrastructure feature - permanently unstable. Used to verify the preview feature gating mechanism works.
Implementations§
§impl PreviewFeature
impl PreviewFeature
pub fn all() -> Vec<PreviewFeature>
pub fn all() -> Vec<PreviewFeature>
Get all available preview features.
Trait Implementations§
§impl Clone for PreviewFeature
impl Clone for PreviewFeature
§fn clone(&self) -> PreviewFeature
fn clone(&self) -> PreviewFeature
Returns a duplicate 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 more§impl Debug for PreviewFeature
impl Debug for PreviewFeature
§impl Display for PreviewFeature
impl Display for PreviewFeature
§impl<'_derivative_strum> From<&'_derivative_strum PreviewFeature> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum PreviewFeature> for &'static str
§fn from(x: &'_derivative_strum PreviewFeature) -> &'static str
fn from(x: &'_derivative_strum PreviewFeature) -> &'static str
Converts to this type from the input type.
§impl From<PreviewFeature> for &'static str
impl From<PreviewFeature> for &'static str
§fn from(x: PreviewFeature) -> &'static str
fn from(x: PreviewFeature) -> &'static str
Converts to this type from the input type.
§impl FromStr for PreviewFeature
impl FromStr for PreviewFeature
§impl Hash for PreviewFeature
impl Hash for PreviewFeature
§impl IntoEnumIterator for PreviewFeature
impl IntoEnumIterator for PreviewFeature
§impl PartialEq for PreviewFeature
impl PartialEq for PreviewFeature
§impl TryFrom<&str> for PreviewFeature
impl TryFrom<&str> for PreviewFeature
impl Copy for PreviewFeature
impl Eq for PreviewFeature
impl StructuralPartialEq for PreviewFeature
Auto Trait Implementations§
impl Freeze for PreviewFeature
impl RefUnwindSafe for PreviewFeature
impl Send for PreviewFeature
impl Sync for PreviewFeature
impl Unpin for PreviewFeature
impl UnsafeUnpin for PreviewFeature
impl UnwindSafe for PreviewFeature
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].