Trait Feature

Source
pub trait Feature {
    // Required methods
    fn name(&self) -> &'static str;
    fn required(&self) -> bool;
    fn vector_length(&self) -> usize;
    fn check_volatile(&self) -> bool;

    // Provided method
    fn check(&self) -> bool { ... }
}
Expand description

A feature that can be checked at runtime.

Required Methods§

Source

fn name(&self) -> &'static str

The name of the feature.

Source

fn required(&self) -> bool

Whether the feature is required for the crate to work.

Source

fn vector_length(&self) -> usize

The length of the vector in bytes.

Source

fn check_volatile(&self) -> bool

Checks if the feature is supported at runtime.

Provided Methods§

Source

fn check(&self) -> bool

Checks if the feature is supported.

Implementors§