[][src]Trait tide::Compute

pub trait Compute: 'static + Sync + Send + Clone + Sized {
    fn compute_fresh(req: &mut Request) -> Self;

    fn compute(req: &mut Request) -> Self { ... }
}

A value that can be computed on-demand from a request.

Required methods

fn compute_fresh(req: &mut Request) -> Self

Compute the value directly from the given request.

Loading content...

Provided methods

fn compute(req: &mut Request) -> Self

Compute the value, or return a copy if it has already been computed for this request.

Loading content...

Implementors

Loading content...