Struct rouille::LogEntry [] [src]

pub struct LogEntry<W> where W: Write {
    // some fields omitted
}

RAII guard that ensures that a log entry corresponding to a request will be written.

Example

rouille::start_server("localhost:80", move |request| {
    let _entry = rouille::LogEntry::start(std::io::stdout(), request);

    // process the request here

}); // <-- the log entry is written at the end of this block

Methods

impl<'a, W> LogEntry<W> where W: Write

fn start(output: W, rq: &Request) -> LogEntry<W>

Starts a LogEntry.

Trait Implementations

impl<W> Drop for LogEntry<W> where W: Write

fn drop(&mut self)