pub(crate) struct SettingGroupBuilder {
    name: &'static str,
    settings: Vec<ProtoSetting>,
    presets: Vec<Preset>,
    predicates: Vec<ProtoPredicate>,
}

Fields§

§name: &'static str§settings: Vec<ProtoSetting>§presets: Vec<Preset>§predicates: Vec<ProtoPredicate>

Implementations§

Compute the layout of the byte vector used to represent this settings group.

The byte vector contains the following entries in order:

  1. Byte-sized settings like NumSetting and EnumSetting.
  2. BoolSetting settings.
  3. Precomputed named predicates.
  4. 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§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.