Skip to main content

Feature

Trait Feature 

Source
pub trait Feature: Copy {
    // Required method
    fn targets(self) -> [Availability; 3];

    // Provided method
    fn availability(self) -> Availability { ... }
}

Required Methods§

Source

fn targets(self) -> [Availability; 3]

The feature’s availability on Linux, macOS and the web, in that order.

Provided Methods§

Source

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".

Implementors§