pub enum Attr<'a> {
Plain {
name: Symbol,
value: &'a Expr<'a>,
},
Bind {
field: Symbol,
},
Class {
name: Symbol,
cond: &'a Expr<'a>,
},
Directive {
name: Symbol,
value: &'a Expr<'a>,
},
}Expand description
One attribute-position item of an element, in source order.
Variants§
Plain
name=<expr> — a plain (possibly dynamic) attribute.
Bind
bound to <field> / bind={field} — two-way form binding.
Class
class:name={condition} — the class is present exactly while the condition holds.
Directive
A declared ## Directive used as an attribute (tooltip={text}).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Attr<'a>
impl<'a> RefUnwindSafe for Attr<'a>
impl<'a> Send for Attr<'a>
impl<'a> Sync for Attr<'a>
impl<'a> Unpin for Attr<'a>
impl<'a> UnsafeUnpin for Attr<'a>
impl<'a> UnwindSafe for Attr<'a>
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