MemberSettings

Struct MemberSettings 

Source
pub struct MemberSettings {
    pub read_only: bool,
    pub bools: Option<BoolSettings>,
    pub tuples: Option<TupleSettings>,
    pub maps: Option<MapSettings>,
    pub vec: Option<VecSettings>,
    pub arrays: Option<ArraySettings>,
    pub numerics_i32: Option<NumericTypeSettings>,
    pub numerics_f32: Option<NumericTypeSettings>,
    pub numerics_u32: Option<NumericTypeSettings>,
    pub numerics_f64: Option<NumericTypeSettings>,
}
Expand description

Per-member override settings layered on top of global ReflectSettings.

This provides an ImSettings-style configuration surface for specific fields (members) of a reflected type, analogous to ImSettings::push_member<&T::field>() in ImReflect.

Fields§

§read_only: bool

Whether this member should be rendered in a read-only (disabled) state.

§bools: Option<BoolSettings>

Optional override for boolean style settings on this member.

§tuples: Option<TupleSettings>

Optional override for tuple rendering settings on this member.

§maps: Option<MapSettings>

Optional override for map rendering settings on this member.

§vec: Option<VecSettings>

Optional override for vector rendering settings on this member.

§arrays: Option<ArraySettings>

Optional override for fixed-size array rendering settings on this member.

§numerics_i32: Option<NumericTypeSettings>

Optional numeric settings override for i32 members.

§numerics_f32: Option<NumericTypeSettings>

Optional numeric settings override for f32 members.

§numerics_u32: Option<NumericTypeSettings>

Optional numeric settings override for u32 members.

§numerics_f64: Option<NumericTypeSettings>

Optional numeric settings override for f64 members.

Implementations§

Source§

impl MemberSettings

Source

pub fn vec_reorder_only(&mut self) -> &mut Self

Convenience helper: mark a Vec<T> member as “reorder-only” (no insertion/removal, but drag-to-reorder remains enabled).

Source

pub fn vec_fixed(&mut self) -> &mut Self

Convenience helper: mark a Vec<T> member as “fixed” (no insertion, removal, or reordering). The contents are still editable unless combined with read_only.

Source

pub fn arrays_fixed_order(&mut self) -> &mut Self

Convenience helper: mark an array member as fixed-order (no reordering of elements, but still rendered inside an optional dropdown).

Source

pub fn maps_const(&mut self) -> &mut Self

Convenience helper: mark a map member as “const-map” (no insertion or removal, keys/values still editable when not read-only).

Source

pub fn maps_editable(&mut self) -> &mut Self

Convenience helper: explicitly mark a map member as fully editable using default dropdown/table behavior.

Source

pub fn numerics_f32_slider_0_to_1(&mut self, precision: u32) -> &mut Self

Convenience helper: configure f32 numerics on this member as a slider in the range [0, 1] with clamping and %.Nf formatting.

Source

pub fn numerics_f32_slider_minus1_to_1(&mut self, precision: u32) -> &mut Self

Convenience helper: configure f32 numerics on this member as a slider in the range [-1, 1] with clamping and %.Nf formatting.

Source

pub fn numerics_f32_drag_with_speed( &mut self, speed: f64, precision: u32, ) -> &mut Self

Convenience helper: configure f32 numerics on this member as a drag widget with a given speed and %.Nf formatting.

Source

pub fn numerics_f32_percentage_slider_0_to_1( &mut self, precision: u32, ) -> &mut Self

Convenience helper: configure f32 numerics on this member as a slider in [0, 1] displayed as a percentage %.Nf%% with clamping.

Source

pub fn numerics_f64_slider_0_to_1(&mut self, precision: u32) -> &mut Self

Convenience helper: configure f64 numerics on this member as a slider in the range [0, 1] with clamping and %.Nf formatting.

Source

pub fn numerics_f64_slider_minus1_to_1(&mut self, precision: u32) -> &mut Self

Convenience helper: configure f64 numerics on this member as a slider in the range [-1, 1] with clamping and %.Nf formatting.

Source

pub fn numerics_f64_drag_with_speed( &mut self, speed: f64, precision: u32, ) -> &mut Self

Convenience helper: configure f64 numerics on this member as a drag widget with a given speed and %.Nf formatting.

Source

pub fn numerics_f64_percentage_slider_0_to_1( &mut self, precision: u32, ) -> &mut Self

Convenience helper: configure f64 numerics on this member as a slider in [0, 1] displayed as a percentage %.Nf%% with clamping.

Source

pub fn numerics_i32_input_decimal( &mut self, step: i32, step_fast: i32, ) -> &mut Self

Convenience helper: configure i32 numerics on this member as an input widget using decimal formatting (%d) and optional steps.

Pass zero for step or step_fast to leave that parameter unset.

Source

pub fn numerics_i32_input_hex(&mut self) -> &mut Self

Convenience helper: configure i32 numerics on this member as an input widget using lowercase hexadecimal formatting (%x).

Source

pub fn numerics_i32_slider_range( &mut self, min: i32, max: i32, clamp: bool, ) -> &mut Self

Convenience helper: configure i32 numerics on this member as a slider over an explicit integer range, with optional clamping.

Source

pub fn numerics_i32_slider_0_to_100(&mut self) -> &mut Self

Convenience helper: configure i32 numerics on this member as a slider in the range [0, 100] with clamping.

Source

pub fn numerics_u32_input_decimal( &mut self, step: u32, step_fast: u32, ) -> &mut Self

Convenience helper: configure u32 numerics on this member as an input widget using unsigned decimal formatting (%u) and optional steps. Pass zero to leave a step unset.

Source

pub fn numerics_u32_input_hex(&mut self) -> &mut Self

Convenience helper: configure u32 numerics on this member as an input widget using lowercase hexadecimal formatting (%x).

Source

pub fn numerics_u32_slider_range( &mut self, min: u32, max: u32, clamp: bool, ) -> &mut Self

Convenience helper: configure u32 numerics on this member as a slider over an explicit integer range, with optional clamping.

Source

pub fn numerics_u32_slider_0_to_100(&mut self) -> &mut Self

Convenience helper: configure u32 numerics on this member as a slider in the range [0, 100] with clamping.

Trait Implementations§

Source§

impl Clone for MemberSettings

Source§

fn clone(&self) -> MemberSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemberSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MemberSettings

Source§

fn default() -> MemberSettings

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more