pub trait AttributeValue {
    // Required method
    fn write_attribute_value(self, w: &mut impl Write) -> Result;

    // Provided method
    fn is_unit(&self) -> bool { ... }
}
Expand description

Represents a value of an attribute.

Required Methods§

source

fn write_attribute_value(self, w: &mut impl Write) -> Result

Writes the attribute value to w.

Arguments
  • w - The writer to write to.

Provided Methods§

source

fn is_unit(&self) -> bool

Tells whether the attribute value is a unit value, meaning that it is not written.

Implementations on Foreign Types§

source§

impl AttributeValue for &String

source§

fn is_unit(&self) -> bool

source§

fn write_attribute_value(self, w: &mut impl Write) -> Result

source§

impl AttributeValue for &&str

source§

fn is_unit(&self) -> bool

source§

fn write_attribute_value(self, w: &mut impl Write) -> Result

source§

impl AttributeValue for &str

source§

fn is_unit(&self) -> bool

source§

fn write_attribute_value(self, w: &mut impl Write) -> Result

source§

impl AttributeValue for String

source§

fn is_unit(&self) -> bool

source§

fn write_attribute_value(self, w: &mut impl Write) -> Result

source§

impl AttributeValue for ()

source§

fn is_unit(&self) -> bool

source§

fn write_attribute_value(self, _w: &mut impl Write) -> Result

Implementors§