Struct ::exo::dom::Comment

Overview

Comment dom node. This comment can not be fetched by id and will not be rendered

This node is used inside a dom to display a comment. Supported fields of this node are:

  • inner: The id of this node

Within the layouter this data can be used like this:

<!-- This is a comment -->

Methods

fn new() -> Comment

Creates a new Comment.

Example

let node = exo::dom::Comment::new();
node.inner = "This is a comment";

Protocols

protocol partial_eq
if value == b { }

Allows for partial equality operations to work.

protocol string_debug
println("{:?}", value)

Allows the value to be debug printed.

protocol string_display
println("{}", value)

Allows the value to be display printed.

protocol get inner
let output = value.inner

Get the comment as text.

Example

let node = exo::dom::Comment::new();
node.inner = "This is a comment";
assert_eq!(node.inner, "This is a comment");
protocol set inner
value.inner = input

Set the comment as text.

Example

let node = exo::dom::Comment::new();
node.inner = "This is a comment";
assert_eq!(node.inner, "This is a comment");