pub struct Feature {
name: &'static str,
stability: Status,
version: &'static str,
docs: &'static str,
get: fn(_: &Features) -> bool,
}
Expand description
Status and metadata for a single unstable feature.
Fields§
§name: &'static str
Feature name. This is valid Rust identifier so no dash only underscore.
stability: Status
§version: &'static str
Version that this feature was stabilized or removed.
docs: &'static str
Link to the unstable documentation.
get: fn(_: &Features) -> bool
Implementations§
Source§impl Feature
impl Feature
Sourcepub const fn test_dummy_stable() -> &'static Feature
pub const fn test_dummy_stable() -> &'static Feature
A dummy feature that doesn’t actually gate anything, but it’s used in testing to ensure that we can enable stable features.
Sourcepub const fn test_dummy_unstable() -> &'static Feature
pub const fn test_dummy_unstable() -> &'static Feature
A dummy feature that gates the usage of the im-a-teapot
manifest
entry. This is basically just intended for tests.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html.
Sourcepub const fn alternative_registries() -> &'static Feature
pub const fn alternative_registries() -> &'static Feature
Downloading packages from alternative registry indexes.
See https://doc.rust-lang.org/nightly/cargo/reference/registries.html.
Sourcepub const fn rename_dependency() -> &'static Feature
pub const fn rename_dependency() -> &'static Feature
Renaming a package in the manifest via the package
key.
Sourcepub const fn publish_lockfile() -> &'static Feature
pub const fn publish_lockfile() -> &'static Feature
Whether a lock file is published with this crate.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#publish-lockfile.
Sourcepub const fn profile_overrides() -> &'static Feature
pub const fn profile_overrides() -> &'static Feature
Overriding profiles for dependencies.
See https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#overrides.
Sourcepub const fn default_run() -> &'static Feature
pub const fn default_run() -> &'static Feature
“default-run” manifest option.
See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-default-run-field.
Sourcepub const fn metabuild() -> &'static Feature
pub const fn metabuild() -> &'static Feature
Declarative build scripts.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#metabuild.
Sourcepub const fn public_dependency() -> &'static Feature
pub const fn public_dependency() -> &'static Feature
Specifying the ‘public’ attribute on dependencies.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#public-dependency.
Sourcepub const fn named_profiles() -> &'static Feature
pub const fn named_profiles() -> &'static Feature
Allow to specify profiles other than ‘dev’, ‘release’, ‘test’, etc.
See https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#custom-profiles.
Sourcepub const fn resolver() -> &'static Feature
pub const fn resolver() -> &'static Feature
Opt-in new-resolver behavior.
See https://doc.rust-lang.org/nightly/cargo/reference/resolver.html#resolver-versions.
Sourcepub const fn strip() -> &'static Feature
pub const fn strip() -> &'static Feature
Allow to specify whether binaries should be stripped.
See https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#strip-option.
Sourcepub const fn rust_version() -> &'static Feature
pub const fn rust_version() -> &'static Feature
Specifying a minimal ‘rust-version’ attribute for crates.
See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field.
Sourcepub const fn edition2021() -> &'static Feature
pub const fn edition2021() -> &'static Feature
Support for 2021 edition.
See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field.
Sourcepub const fn per_package_target() -> &'static Feature
pub const fn per_package_target() -> &'static Feature
Allow to specify per-package targets (compile kinds).
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#per-package-target.
Sourcepub const fn codegen_backend() -> &'static Feature
pub const fn codegen_backend() -> &'static Feature
Allow to specify which codegen backend should be used.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#codegen-backend.
Sourcepub const fn different_binary_name() -> &'static Feature
pub const fn different_binary_name() -> &'static Feature
Allow specifying different binary name apart from the crate name.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#different-binary-name.
Sourcepub const fn profile_rustflags() -> &'static Feature
pub const fn profile_rustflags() -> &'static Feature
Allow specifying rustflags directly in a profile.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-rustflags-option.
Sourcepub const fn workspace_inheritance() -> &'static Feature
pub const fn workspace_inheritance() -> &'static Feature
Allow workspace members to inherit fields and dependencies from a workspace.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#workspace-inheritance.
Sourcepub const fn edition2024() -> &'static Feature
pub const fn edition2024() -> &'static Feature
Support for 2024 edition.
See https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-edition-field.
Sourcepub const fn trim_paths() -> &'static Feature
pub const fn trim_paths() -> &'static Feature
Allow setting trim-paths in a profile to control the sanitisation of file paths in build outputs.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-trim-paths-option.
Sourcepub const fn open_namespaces() -> &'static Feature
pub const fn open_namespaces() -> &'static Feature
Allow multiple packages to participate in the same API namespace
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#open-namespaces.
Sourcepub const fn path_bases() -> &'static Feature
pub const fn path_bases() -> &'static Feature
Allow paths that resolve relatively to a base specified in the config.
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#path-bases.
Sourcefn is_enabled(&self, features: &Features) -> bool
fn is_enabled(&self, features: &Features) -> bool
Whether this feature is allowed to use in the given Features
context.
pub(crate) fn name(&self) -> &str
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnwindSafe for Feature
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
§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>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 64 bytes