kuchiki-rs / kuchiki

(朽木) HTML/XML tree manipulation library for Rust
MIT License
470 stars 54 forks source link

Can't reference Sink in struct #68

Closed ferristseng closed 4 years ago

ferristseng commented 4 years ago

The Sink type is private, but parse_html returns a Parser<Sink> type.

This makes it impossible to reference the return type in a struct:

struct App {
    config: Config,
    current_parser: Option<Parser<Sink>>, // <-- Can't do this
    buffer: [u8; 1024],
    counter: usize,
}