Skip to main content

FeatureRecordBuilderOps

Trait FeatureRecordBuilderOps 

Source
pub trait FeatureRecordBuilderOps: Sized {
    // Required methods
    fn new(section_name: impl Into<String>) -> Self;
    fn enabled(self, v: bool) -> Self;
    fn override_source(self, v: OverrideSource) -> Self;
    fn requires(self, v: &'static [&'static str]) -> Self;
    fn metadata(self, v: FeatureMetadata) -> Self;
    fn build(self) -> FeatureRecord;
}
Expand description

Fluent builder operations for constructing FeatureRecord instances.

Implemented by crate::FeatureRecordBuilder.

Required Methods§

Source

fn new(section_name: impl Into<String>) -> Self

Create a new record builder for the named section.

Source

fn enabled(self, v: bool) -> Self

Mark the feature as enabled or disabled.

Source

fn override_source(self, v: OverrideSource) -> Self

Record the source that overrode the feature state.

Source

fn requires(self, v: &'static [&'static str]) -> Self

Attach the required feature dependencies.

Source

fn metadata(self, v: FeatureMetadata) -> Self

Attach feature metadata to the record under construction.

Source

fn build(self) -> FeatureRecord

Finalise the builder and return the feature record.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§