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 automatically written at the end of the handler
});

Methods

impl<'a, W> LogEntry<W> where W: Write
[src]

Starts a LogEntry.

Trait Implementations

impl<W> Drop for LogEntry<W> where W: Write
[src]

A method called when the value goes out of scope. Read more