pub fn with_batch_ctx<T>(cb: impl FnOnce(&mut BatchContext) -> T) -> T {
    BATCH_CONTEXT.with(|cell| {
        let ctx = cell.borrow();
        let ctx = ctx
            .as_ref()
            .expect("Tried to call a batched loader outside of a batching context.");
        let mut ctx = (&*ctx).borrow_mut();
        cb(&mut ctx)
    })
}
/// Retrieves the batch context from thread local storage
Retrieves the batch context from thread local storage
Retrieves the batch context from thread local storage
pub fn with_batch_ctx<T>(cb: impl FnOnce(&mut BatchContext) -> T) -> T {
    BATCH_CONTEXT.with(|cell| {
        let ctx = cell.borrow();
        let ctx = ctx
            .as_ref()
            .expect("Tried to call a batched loader outside of a batching context.");
        let mut ctx = (&*ctx).borrow_mut();
        cb(&mut ctx)
    })
}
pub fn with_batch_ctx < T > ( cb : impl FnOnce ( & mut BatchContext ) -> T ) -> T { BATCH_CONTEXT . with ( | cell | { let ctx = cell . borrow ( ) ; let ctx = ctx . as_ref ( ) . expect ( " " ) ; let mut ctx = ( & * ctx ) . borrow_mut ( ) ; cb ( & mut ctx ) } ) }
Retrieves the batch context from thread local storage
Retrieves the batch context from thread local storage
cb
impl FnOnce(&mut BatchContext) -> T
cb
impl FnOnce(&mut BatchContext) -> T