Trait ParkParser

Source
pub trait ParkParser {
    // Required methods
    fn new() -> Self;
    fn get_ride_times(&self, html: &str) -> Result<Vec<RideTime>>;
}
Expand description

Defines how a park’s rides should be parsed out of an HTML page.

Required Methods§

Source

fn new() -> Self

Builds all components needed for parsing eg. selectors or regex.

Source

fn get_ride_times(&self, html: &str) -> Result<Vec<RideTime>>

Parses all rides and their current wait from the passed html string. Errors if HTML is unable to be properly parsed, but does not verify if valid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§