pub struct Var;Expand description
The <var> element - variable or placeholder.
§Purpose
The <var> element represents a variable in a mathematical expression, programming
context, or a placeholder where the user should substitute their own value.
§Content Categories
- Flow Content
- Phrasing Content
- Palpable Content
§Permitted Content Model
- Phrasing content
§Common Use Cases
- Variables in mathematical equations
- Programming variable names
- Placeholder values in documentation
- Parameters in formulas or functions
§Key Attributes
- Global attributes only
§Example
<p>The area of a rectangle is <var>width</var> × <var>height</var>.</p>
<p>Set <var>username</var> to your account name.</p>
<p>The function signature is <code>greet(<var>name</var>)</code>.</p>§WHATWG Specification
Trait Implementations§
Source§impl HtmlElement for Var
impl HtmlElement for Var
impl<T: PhrasingContent> CanContain<T> for Var
impl CanContain<Text> for Var
impl FlowContent for Var
impl PalpableContent for Var
impl PhrasingContent for Var
Auto Trait Implementations§
impl Freeze for Var
impl RefUnwindSafe for Var
impl Send for Var
impl Sync for Var
impl Unpin for Var
impl UnwindSafe for Var
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more