Struct fungi_lang::html::Div

source ·
pub struct Div {
    pub tag: String,
    pub classes: Vec<String>,
    pub extent: Box<Vec<Div>>,
    pub text: Option<String>,
}
Expand description

The Div struct represents a restricted form of a <div> element in HTML. The field tag is a string, which corresponds to a distinguished tag CSS class that indicates the Rust datatype reflected into this Div. The other CSS classes hold bits that signal various subcases (e.g., of enums in the reflect module). For Rust structures that have subfields and/or substructure, the Div’s extent field lists their reflections into Divs. In principle, the produced Div structure has an equivalent amount of information to the corresponding Rust datatype, and could be “parsed” back into this Rust datatype later (let’s not do that, though!). The text field is useful for Div versions of Names, for giving the text of the name.

Fields

tag: Stringclasses: Vec<String>extent: Box<Vec<Div>>text: Option<String>

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

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.

Calls U::from(self).

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

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.