[][src]Trait bevy_contrib_inspector::Inspectable

pub trait Inspectable: Send + Sync + 'static {
    fn html() -> String;
fn update(&mut self, field: &str, value: &str); fn options() -> InspectableOptions { ... } }

This trait describes how a struct should be rendered in HTML. It is meant to be derived, see the crate-level docs for that.

Required methods

fn html() -> String

The HTML code which will be rendered from the webserver.

fn update(&mut self, field: &str, value: &str)

When recieving a PUT request, its body will be parsed as $field:$value. The update function is supposed to parse the value into its correct type and set it on self.

Loading content...

Provided methods

fn options() -> InspectableOptions

Describes things like the webserver's port. Can be set with a #[inspector(option = value)] on the struct.

Loading content...

Implementors

Loading content...