pub struct BuildScriptExportDescriptor<T> {
pub mutually_exclusive: bool,
pub mandatory: bool,
pub constant_name: String,
pub feature_type_name: String,
pub feature_code_formatter: Box<dyn Fn(&T) -> String>,
}
Expand description
Build script export descriptor. It describes how to export features to build script.
Fields§
§mutually_exclusive: bool
This feature is mutually exclusive.
When it is true
, generated const has singular type.
When it is false
, generated const has &'static []
type.
mandatory: bool
This feature is mandatory.
When mutually_exclusive
is false
, this value is ignored.
When it is true
, generated const will be wrapped with Option
type.
constant_name: String
Name of the generated const.
feature_type_name: String
Type name of generated const
feature_code_formatter: Box<dyn Fn(&T) -> String>
Code generator for each feature. This function should return constant time construction code.
Auto Trait Implementations§
impl<T> Freeze for BuildScriptExportDescriptor<T>
impl<T> !RefUnwindSafe for BuildScriptExportDescriptor<T>
impl<T> !Send for BuildScriptExportDescriptor<T>
impl<T> !Sync for BuildScriptExportDescriptor<T>
impl<T> Unpin for BuildScriptExportDescriptor<T>
impl<T> !UnwindSafe for BuildScriptExportDescriptor<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more