Trait domafic::processors::DomNodeProcessor
[−]
[src]
pub trait DomNodeProcessor<'a, Message> { type Acc; type Error; fn get_processor<T: DomNode<Message>>(
) -> fn(_: &mut Self::Acc, _: &'a T) -> Result<(), Self::Error>; }
DomNodeProcessor
s are used to iterate over DomNode
s which may or may not be the same type.
Implementations of this trait resemble traditional fold
functions, modifying an accumulator
(of type Acc
) and returning an error as necessary.
Associated Types
type Acc
Type of the accumulator updated by get_processor
type Error
Type of error returned by failed calls to get_processor
Required Methods
fn get_processor<T: DomNode<Message>>(
) -> fn(_: &mut Self::Acc, _: &'a T) -> Result<(), Self::Error>
) -> fn(_: &mut Self::Acc, _: &'a T) -> Result<(), Self::Error>
Returns a folding function capable of processing elements of type T: DomNode
.
Implementors
impl<'a, M, W: Write> DomNodeProcessor<'a, M> for HtmlWriter<W> type Acc = W; type Error = Error;