Div

Struct 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: String§classes: Vec<String>§extent: Box<Vec<Div>>§text: Option<String>

Trait Implementations§

Source§

impl Clone for Div

Source§

fn clone(&self) -> Div

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Div

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl WriteHTML for Div

Source§

fn write_html<Wr: Write>(&self, wr: &mut Wr)

Auto Trait Implementations§

§

impl Freeze for Div

§

impl RefUnwindSafe for Div

§

impl Send for Div

§

impl Sync for Div

§

impl Unpin for Div

§

impl UnwindSafe for Div

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.