Trait rstml_component::HtmlAttributeValue

source ·
pub trait HtmlAttributeValue {
    // Required method
    fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result;
}
Expand description

A trait representing a value that can be used as an attribute value in HTML components.

Types that implement this trait allow customization of how their values are formatted when used as attribute values in HTML tags. This trait is primarily used in conjunction with the HtmlAttributeFormatter to control the serialization of attribute values.

Required Methods§

source

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

Formats the value and writes it to the provided HtmlAttributeFormatter.

This method is used to customize how the implementing type’s value is serialized as an attribute value in HTML. Implementations of this method should write the formatted value to the provided HtmlAttributeFormatter using the appropriate formatting syntax.

§Arguments
§Returns

A std::fmt::Result indicating the success or failure of the formatting operation.

Implementations on Foreign Types§

source§

impl HtmlAttributeValue for &str

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for &String

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for bool

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for f32

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for f64

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for i8

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for i16

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for i32

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for i64

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for i128

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for isize

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for u8

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for u16

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for u32

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for u64

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for u128

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for ()

source§

fn fmt(self, _formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for usize

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for String

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl HtmlAttributeValue for Bytes

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<'a> HtmlAttributeValue for Arguments<'a>

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<N, O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (N, O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<O, P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (O, P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<P, Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (P, Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<Q, R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (Q, R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<R, S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (R, S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<S, T, U, V, W, X, Y, Z> HtmlAttributeValue for (S, T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<T, U, V, W, X, Y, Z> HtmlAttributeValue for (T, U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<T: HtmlAttributeValue> HtmlAttributeValue for Option<T>

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<U, V, W, X, Y, Z> HtmlAttributeValue for (U, V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<V, W, X, Y, Z> HtmlAttributeValue for (V, W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<W, X, Y, Z> HtmlAttributeValue for (W, X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<X, Y, Z> HtmlAttributeValue for (X, Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<Y, Z> HtmlAttributeValue for (Y, Z)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

source§

impl<Z> HtmlAttributeValue for (Z,)

source§

fn fmt(self, formatter: &mut HtmlAttributeFormatter<'_>) -> Result

Implementors§