pub trait Feature: Copy {
// Required method
fn targets(self) -> [Availability; 3];
// Provided method
fn availability(self) -> Availability { ... }
}Required Methods§
Sourcefn targets(self) -> [Availability; 3]
fn targets(self) -> [Availability; 3]
The feature’s availability on Linux, macOS and the web, in that order.
Provided Methods§
Sourcefn availability(self) -> Availability
fn availability(self) -> Availability
Whether the feature can be used on this target. A crate whose build can leave a backend out overrides this to say so.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".