ReflectSettings

Struct ReflectSettings 

Source
pub struct ReflectSettings { /* private fields */ }
Expand description

Settings that control how certain types are rendered by dear-imgui-reflect.

This mirrors some of the concepts from ImReflect’s ImSettings type, but is intentionally smaller and focused on common container behaviors.

Implementations§

Source§

impl ReflectSettings

Source

pub fn new() -> Self

Creates a new settings object with reasonable defaults.

Source

pub fn vec(&self) -> &VecSettings

Settings that apply to all Vec<T> containers rendered via reflection.

Source

pub fn vec_mut(&mut self) -> &mut VecSettings

Mutable access to settings that apply to all Vec<T> containers.

Source

pub fn bools(&self) -> &BoolSettings

Settings that apply to all bool fields rendered via reflection.

Source

pub fn bools_mut(&mut self) -> &mut BoolSettings

Mutable access to settings that apply to all bool fields.

Source

pub fn arrays(&self) -> &ArraySettings

Settings that apply to fixed-size arrays rendered via reflection.

Source

pub fn arrays_mut(&mut self) -> &mut ArraySettings

Mutable access to settings that apply to fixed-size arrays.

Source

pub fn maps(&self) -> &MapSettings

Settings that apply to string-keyed maps rendered via reflection.

Source

pub fn maps_mut(&mut self) -> &mut MapSettings

Mutable access to settings that apply to string-keyed maps.

Source

pub fn tuples(&self) -> &TupleSettings

Settings that apply to tuple-like values rendered via reflection.

Source

pub fn tuples_mut(&mut self) -> &mut TupleSettings

Mutable access to settings that apply to tuple-like values.

Source

pub fn numerics_i32(&self) -> &NumericTypeSettings

Type-level numeric settings for i32 values rendered via reflection.

Source

pub fn numerics_i32_mut(&mut self) -> &mut NumericTypeSettings

Mutable access to type-level numeric settings for i32 values.

Source

pub fn numerics_f32(&self) -> &NumericTypeSettings

Type-level numeric settings for f32 values rendered via reflection.

Source

pub fn numerics_f32_mut(&mut self) -> &mut NumericTypeSettings

Mutable access to type-level numeric settings for f32 values.

Source

pub fn numerics_u32(&self) -> &NumericTypeSettings

Type-level numeric settings for u32 values rendered via reflection.

Source

pub fn numerics_u32_mut(&mut self) -> &mut NumericTypeSettings

Mutable access to type-level numeric settings for u32 values.

Source

pub fn numerics_f64(&self) -> &NumericTypeSettings

Type-level numeric settings for f64 values rendered via reflection.

Source

pub fn numerics_f64_mut(&mut self) -> &mut NumericTypeSettings

Mutable access to type-level numeric settings for f64 values.

Source

pub fn member<T: 'static>(&self, field: &str) -> Option<&MemberSettings>

Returns member-level settings for a given type and field name, if any.

This provides an ImSettings-style per-member override analogous to push_member<&T::field>() in ImReflect.

Member keys follow the paths generated by the derive macro:

  • Named-field structs: "field_name"
  • Tuple structs: "0", "1", …
  • Enums with payloads: "Variant.field_name" or "Variant.0", "Variant.1", …
  • Tuple element overrides: "tuple_field[0]", "tuple_field[1]", …
Source

pub fn for_member<T: 'static>(&mut self, field: &str) -> &mut MemberSettings

Returns a mutable handle to member-level settings for a given type and field name, creating a default entry if it does not yet exist.

See ReflectSettings::member for the expected member-key formats.

Trait Implementations§

Source§

impl Clone for ReflectSettings

Source§

fn clone(&self) -> ReflectSettings

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 ReflectSettings

Source§

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

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

impl Default for ReflectSettings

Source§

fn default() -> ReflectSettings

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