pub trait GenApiCtxt {
    type NS: NodeStore;
    type VS: ValueStore;
    type CS: CacheStore;

    // Required methods
    fn enter<F, R>(&mut self, f: F) -> R
       where F: FnOnce(&Self::NS, &mut ValueCtxt<Self::VS, Self::CS>) -> R;
    fn node_store(&self) -> &Self::NS;

    // Provided method
    fn clear_cache(&mut self) { ... }
}
Expand description

A trait that provides accesss to GenApi context.

Required Associated Types§

source

type NS: NodeStore

A type that implements NodeStore

source

type VS: ValueStore

A type that implements ValueStore

source

type CS: CacheStore

A type that implements CacheStore

Required Methods§

source

fn enter<F, R>(&mut self, f: F) -> Rwhere F: FnOnce(&Self::NS, &mut ValueCtxt<Self::VS, Self::CS>) -> R,

Provide access to the context.

source

fn node_store(&self) -> &Self::NS

Returns NodeStore in the context.

Provided Methods§

source

fn clear_cache(&mut self)

Clear all cache of the context.

Implementations on Foreign Types§

source§

impl<T: GenApiCtxt + ?Sized> GenApiCtxt for Box<T>

§

type NS = <T as GenApiCtxt>::NS

§

type VS = <T as GenApiCtxt>::VS

§

type CS = <T as GenApiCtxt>::CS

source§

fn enter<F, R>(&mut self, f: F) -> Rwhere F: FnOnce(&Self::NS, &mut ValueCtxt<Self::VS, Self::CS>) -> R,

source§

fn node_store(&self) -> &Self::NS

source§

fn clear_cache(&mut self)

source§

impl<'a, T: 'a + GenApiCtxt + ?Sized> GenApiCtxt for &'a mut T

§

type NS = <T as GenApiCtxt>::NS

§

type VS = <T as GenApiCtxt>::VS

§

type CS = <T as GenApiCtxt>::CS

source§

fn enter<F, R>(&mut self, f: F) -> Rwhere F: FnOnce(&Self::NS, &mut ValueCtxt<Self::VS, Self::CS>) -> R,

source§

fn node_store(&self) -> &Self::NS

source§

fn clear_cache(&mut self)

Implementors§