pub struct Context<'a, E: EntityKind> {
pub db: &'a Db<E::Canister>,
/* private fields */
}Expand description
Context
Fields§
§db: &'a Db<E::Canister>Implementations§
Source§impl<'a, E> Context<'a, E>where
E: EntityKind,
impl<'a, E> Context<'a, E>where
E: EntityKind,
pub const fn new(db: &'a Db<E::Canister>) -> Self
pub fn with_store<R>(&self, f: impl FnOnce(&DataStore) -> R) -> Result<R, Error>
pub fn with_store_mut<R>( &self, f: impl FnOnce(&mut DataStore) -> R, ) -> Result<R, Error>
Sourcepub fn candidates_from_plan(
&self,
plan: QueryPlan,
) -> Result<Vec<DataKey>, Error>
pub fn candidates_from_plan( &self, plan: QueryPlan, ) -> Result<Vec<DataKey>, Error>
Analyze Plan
pub fn rows_from_plan(&self, plan: QueryPlan) -> Result<Vec<DataRow>, Error>
Auto Trait Implementations§
impl<'a, E> Freeze for Context<'a, E>
impl<'a, E> RefUnwindSafe for Context<'a, E>
impl<'a, E> Send for Context<'a, E>
impl<'a, E> Sync for Context<'a, E>
impl<'a, E> Unpin for Context<'a, E>where
E: Unpin,
impl<'a, E> UnwindSafe for Context<'a, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more