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§
Sourcefn new(option: PrintFeatureOption, parameters: Vec<ParameterInit>) -> Self
fn new(option: PrintFeatureOption, parameters: Vec<ParameterInit>) -> Self
Create a new instance.
Sourcefn feature_name() -> OwnedName
fn feature_name() -> OwnedName
Get the feature name of the option.
Sourcefn option(&self) -> &PrintFeatureOption
fn option(&self) -> &PrintFeatureOption
Get the DOM of the option.
Sourcefn option_mut(&mut self) -> &mut PrintFeatureOption
fn option_mut(&mut self) -> &mut PrintFeatureOption
Get the mutable reference to the DOM of the option.
Sourcefn parameters(&self) -> &[ParameterInit]
fn parameters(&self) -> &[ParameterInit]
Get the parameters that is used by the option.
Sourcefn parameters_mut(&mut self) -> &mut Vec<ParameterInit>
fn parameters_mut(&mut self) -> &mut Vec<ParameterInit>
Get the mutable reference to the parameters that is used by the option.
Sourcefn into_option_with_parameters(self) -> (PrintFeatureOption, Vec<ParameterInit>)
fn into_option_with_parameters(self) -> (PrintFeatureOption, Vec<ParameterInit>)
Convert the feature option pack into the option and the parameters.
Provided Methods§
Sourcefn display_name(&self) -> Option<&str>
fn display_name(&self) -> Option<&str>
Get display name of the page orientation.
Sourcefn list(capabilities: &PrintCapabilities) -> impl Iterator<Item = Self> + '_
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".