[−][src]Struct cranelift_codegen_meta::cdsl::settings::SettingGroupBuilder
Fields
name: &'static strsettings: Vec<ProtoSetting>presets: Vec<Preset>predicates: Vec<ProtoPredicate>Implementations
impl SettingGroupBuilder[src]
pub fn new(name: &'static str) -> Self[src]
fn add_setting(
&mut self,
name: &'static str,
comment: &'static str,
specific: ProtoSpecificSetting
)[src]
&mut self,
name: &'static str,
comment: &'static str,
specific: ProtoSpecificSetting
)
pub fn add_bool(
&mut self,
name: &'static str,
comment: &'static str,
default: bool
) -> BoolSettingIndex[src]
&mut self,
name: &'static str,
comment: &'static str,
default: bool
) -> BoolSettingIndex
pub fn add_enum(
&mut self,
name: &'static str,
comment: &'static str,
values: Vec<&'static str>
)[src]
&mut self,
name: &'static str,
comment: &'static str,
values: Vec<&'static str>
)
pub fn add_num(
&mut self,
name: &'static str,
comment: &'static str,
default: u8
)[src]
&mut self,
name: &'static str,
comment: &'static str,
default: u8
)
pub fn add_predicate(&mut self, name: &'static str, node: PredicateNode)[src]
pub fn add_preset(
&mut self,
name: &'static str,
args: Vec<PresetType>
) -> PresetIndex[src]
&mut self,
name: &'static str,
args: Vec<PresetType>
) -> PresetIndex
pub fn build(self) -> SettingGroup[src]
Compute the layout of the byte vector used to represent this settings group.
The byte vector contains the following entries in order:
- Byte-sized settings like
NumSettingandEnumSetting. BoolSettingsettings.- Precomputed named predicates.
- Other numbered predicates, including parent predicates that need to be accessible by number.
Set self.settings_size to the length of the byte vector prefix that
contains the settings. All bytes after that are computed, not
configured.
Set self.boolean_offset to the beginning of the numbered predicates,
2. in the list above.
Assign byte_offset and bit_offset fields in all settings.
Auto Trait Implementations
impl RefUnwindSafe for SettingGroupBuilder[src]
impl Send for SettingGroupBuilder[src]
impl Sync for SettingGroupBuilder[src]
impl Unpin for SettingGroupBuilder[src]
impl UnwindSafe for SettingGroupBuilder[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,