[−][src]Trait bevy_contrib_inspector::AsHtml
controls how a type is rendered in HTML
It also specifies how the type is parsed from a string
and what attributes you can apply to it using #[inspector(min = 1, max = 2)]
Associated Types
Loading content...Associated Constants
const DEFAULT_OPTIONS: Self::Options
Default options for the Options
-type
Required methods
fn as_html(
shared: SharedOptions<Self>,
options: Self::Options,
submit_fn: &'static str
) -> String
shared: SharedOptions<Self>,
options: Self::Options,
submit_fn: &'static str
) -> String
The actual html content.
The options
-parameter gives you access to the attributes passed when deriving Inspectable
.
When there is new input, the submit function should be called with it,
for example like this:
format!("<input oninput="{}('new data arrived')" />, submit_fn)
.
fn parse(value: &str) -> Result<Self, Self::Err>
specifies how the type should be parsed
Provided methods
fn header() -> &'static str
HTML that needs to go to the top of the page, e.g. tags used in as_html
.
fn footer() -> &'static str
HTML that needs to go to the bottom of the page, e.g. initializer js glue.
Implementations on Foreign Types
impl AsHtml for u8
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for i8
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for u16
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for u32
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for u64
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for u128
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for usize
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for i16
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for i32
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for i64
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for i128
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for isize
[src]
type Err = ParseIntError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for f32
[src]
type Err = ParseFloatError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for f64
[src]
type Err = ParseFloatError
type Options = NumberAttributes<Self>
const DEFAULT_OPTIONS: Self::Options
[src]
fn header() -> &'static str
[src]
fn footer() -> &'static str
[src]
fn as_html(
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
[src]
shared_options: SharedOptions<Self>,
options: Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for String
[src]
type Err = Infallible
type Options = ()
const DEFAULT_OPTIONS: Self::Options
[src]
fn as_html(
shared: SharedOptions<Self>,
(): Self::Options,
submit_fn: &str
) -> String
[src]
shared: SharedOptions<Self>,
(): Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for bool
[src]
type Err = ParseBoolError
type Options = ()
const DEFAULT_OPTIONS: Self::Options
[src]
fn as_html(
shared: SharedOptions<Self>,
(): Self::Options,
submit_fn: &str
) -> String
[src]
shared: SharedOptions<Self>,
(): Self::Options,
submit_fn: &str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for Color
[src]
type Err = ()
type Options = ()
const DEFAULT_OPTIONS: Self::Options
[src]
fn as_html(
shared: SharedOptions<Self>,
(): Self::Options,
submit_fn: &'static str
) -> String
[src]
shared: SharedOptions<Self>,
(): Self::Options,
submit_fn: &'static str
) -> String
fn parse(value: &str) -> Result<Self, Self::Err>
[src]
impl AsHtml for Vec2
[src]
type Err = ()
type Options = Vec2Attributes
const DEFAULT_OPTIONS: Self::Options
[src]
fn as_html(
shared: SharedOptions<Self>,
options: Self::Options,
submit_fn: &'static str
) -> String
[src]
shared: SharedOptions<Self>,
options: Self::Options,
submit_fn: &'static str
) -> String