logo
pub struct InspectArgsDefault {
    pub header: Option<bool>,
    pub indent_children: Option<bool>,
    pub min_value: Option<f32>,
    pub max_value: Option<f32>,
    pub step: Option<f32>,
}
Expand description

Options for using the default rendering style for the element.

The options here are a superset of all other options since “default” could be any of the widgets.

So, not all elements will necessarily be used/respected. Use the non-default traits for typesafe changes.

Marking a struct element with something like #[inspect(min_value = 5.0, max_value = 53.0)] will make the widget for that member default to those values.

Fields

header: Option<bool>

If true, the struct will have a visual/expandable header added to it. This defaults to true.

To customize this, disable this header programmatically by passing your own InspectArgsDefault into render or render_mut

indent_children: Option<bool>

If true, any child elements (i.e. struct members) will be indented. This defaults to true.

min_value: Option<f32>

Minimum value for the widget. The precise meaning of this can vary depending on the widget type

max_value: Option<f32>

Maximum value for the widget. The precise meaning of this can vary depending on the widget type

step: Option<f32>

Minimum value for the widget. The precise meaning of this can vary depending on the widget type

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Converts to this type from the input type.

Converts to this type from the input type.

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.

Typed getter

Inspect the context.

Inspect the context.

Inspect the context.

Calls U::from(self).

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

Convert into color

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Sets value as a parameter of self.

The resulting type after obtaining ownership.

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

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

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.