Struct lol_html::ElementContentHandlers[][src]

pub struct ElementContentHandlers<'h> { /* fields omitted */ }

Specifies element content handlers associated with a selector.

Implementations

impl<'h> ElementContentHandlers<'h>[src]

pub fn element(
    self,
    handler: impl FnMut(&mut Element<'_, '_>) -> Result<(), Box<dyn Error + Send + Sync>> + 'h
) -> Self
[src]

Sets a handler for elements matched by a selector.

pub fn comments(
    self,
    handler: impl FnMut(&mut Comment<'_>) -> Result<(), Box<dyn Error + Send + Sync>> + 'h
) -> Self
[src]

Sets a handler for HTML comments in the inner content of elements matched by a selector.

pub fn text(
    self,
    handler: impl FnMut(&mut TextChunk<'_>) -> Result<(), Box<dyn Error + Send + Sync>> + 'h
) -> Self
[src]

Sets a handler for text chunks in the inner content of elements matched by a selector.

Trait Implementations

impl<'h> Default for ElementContentHandlers<'h>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.