pub struct ElementContentHandlers<'h, H: HandlerTypes = LocalHandlerTypes> {
pub element: Option<H::ElementHandler<'h>>,
pub comments: Option<H::CommentHandler<'h>>,
pub text: Option<H::TextHandler<'h>>,
}
Expand description
Specifies element content handlers associated with a selector.
Fields§
§element: Option<H::ElementHandler<'h>>
Element handler. See [H::ElementHandler].
comments: Option<H::CommentHandler<'h>>
Comment handler. See [H::CommentHandler].
text: Option<H::TextHandler<'h>>
Text handler. See [H::TextHandler].
Implementations§
source§impl<'h, H: HandlerTypes> ElementContentHandlers<'h, H>
impl<'h, H: HandlerTypes> ElementContentHandlers<'h, H>
sourcepub fn element(self, handler: impl IntoHandler<H::ElementHandler<'h>>) -> Self
pub fn element(self, handler: impl IntoHandler<H::ElementHandler<'h>>) -> Self
Sets a handler for elements matched by a selector.
sourcepub fn comments(self, handler: impl IntoHandler<H::CommentHandler<'h>>) -> Self
pub fn comments(self, handler: impl IntoHandler<H::CommentHandler<'h>>) -> Self
Sets a handler for HTML comments in the inner content of elements matched by a selector.
sourcepub fn text(self, handler: impl IntoHandler<H::TextHandler<'h>>) -> Self
pub fn text(self, handler: impl IntoHandler<H::TextHandler<'h>>) -> Self
Sets a handler for text chunks in the inner content of elements matched by a selector.
Trait Implementations§
source§impl<'h, H: HandlerTypes> Default for ElementContentHandlers<'h, H>
impl<'h, H: HandlerTypes> Default for ElementContentHandlers<'h, H>
Auto Trait Implementations§
impl<'h, H> Freeze for ElementContentHandlers<'h, H>where
<H as HandlerTypes>::ElementHandler<'h>: Freeze,
<H as HandlerTypes>::CommentHandler<'h>: Freeze,
<H as HandlerTypes>::TextHandler<'h>: Freeze,
impl<'h, H> RefUnwindSafe for ElementContentHandlers<'h, H>where
<H as HandlerTypes>::ElementHandler<'h>: RefUnwindSafe,
<H as HandlerTypes>::CommentHandler<'h>: RefUnwindSafe,
<H as HandlerTypes>::TextHandler<'h>: RefUnwindSafe,
impl<'h, H> Send for ElementContentHandlers<'h, H>where
<H as HandlerTypes>::ElementHandler<'h>: Send,
<H as HandlerTypes>::CommentHandler<'h>: Send,
<H as HandlerTypes>::TextHandler<'h>: Send,
impl<'h, H> Sync for ElementContentHandlers<'h, H>where
<H as HandlerTypes>::ElementHandler<'h>: Sync,
<H as HandlerTypes>::CommentHandler<'h>: Sync,
<H as HandlerTypes>::TextHandler<'h>: Sync,
impl<'h, H> Unpin for ElementContentHandlers<'h, H>where
<H as HandlerTypes>::ElementHandler<'h>: Unpin,
<H as HandlerTypes>::CommentHandler<'h>: Unpin,
<H as HandlerTypes>::TextHandler<'h>: Unpin,
impl<'h, H> UnwindSafe for ElementContentHandlers<'h, H>where
<H as HandlerTypes>::ElementHandler<'h>: UnwindSafe,
<H as HandlerTypes>::CommentHandler<'h>: UnwindSafe,
<H as HandlerTypes>::TextHandler<'h>: UnwindSafe,
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