Skip to main content

FeatureOptionPack

Trait FeatureOptionPack 

Source
pub trait FeatureOptionPack: Sized {
    // Required methods
    fn new(option: PrintFeatureOption, parameters: Vec<ParameterInit>) -> Self;
    fn feature_name() -> OwnedName;
    fn option(&self) -> &PrintFeatureOption;
    fn option_mut(&mut self) -> &mut PrintFeatureOption;
    fn parameters(&self) -> &[ParameterInit];
    fn parameters_mut(&mut self) -> &mut Vec<ParameterInit>;
    fn into_option_with_parameters(
        self,
    ) -> (PrintFeatureOption, Vec<ParameterInit>);

    // Provided methods
    fn display_name(&self) -> Option<&str> { ... }
    fn list(capabilities: &PrintCapabilities) -> impl Iterator<Item = Self> + '_ { ... }
}
Expand description

A trait for the feature option pack.

Required Methods§

Source

fn new(option: PrintFeatureOption, parameters: Vec<ParameterInit>) -> Self

Create a new instance.

Source

fn feature_name() -> OwnedName

Get the feature name of the option.

Source

fn option(&self) -> &PrintFeatureOption

Get the DOM of the option.

Source

fn option_mut(&mut self) -> &mut PrintFeatureOption

Get the mutable reference to the DOM of the option.

Source

fn parameters(&self) -> &[ParameterInit]

Get the parameters that is used by the option.

Source

fn parameters_mut(&mut self) -> &mut Vec<ParameterInit>

Get the mutable reference to the parameters that is used by the option.

Source

fn into_option_with_parameters(self) -> (PrintFeatureOption, Vec<ParameterInit>)

Convert the feature option pack into the option and the parameters.

Provided Methods§

Source

fn display_name(&self) -> Option<&str>

Get display name of the page orientation.

Source

fn list(capabilities: &PrintCapabilities) -> impl Iterator<Item = Self> + '_

List all possible options defined in the capabilities.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§