Struct extra::workcache::Context

pub struct Context {
    db: RWArc<Database>,
    logger: RWArc<Logger>,
    cfg: Arc<Object>,
    freshness: Arc<FreshnessMap>,
}

Methods

impl Context

fn new(db: RWArc<Database>, lg: RWArc<Logger>, cfg: Arc<Object>) -> Context

fn new_with_freshness(db: RWArc<Database>, lg: RWArc<Logger>, cfg: Arc<Object>, freshness: Arc<FreshnessMap>) -> Context

fn prep<'a>(&'a self, fn_name: &'a str) -> Prep<'a>

fn with_prep<'a, T>(&'a self, fn_name: &'a str, blk: &fn(p: &mut Prep) -> T) -> T

Trait Implementations

impl std::clone::Clone for Context

fn clone(&self) -> Context