Pending a correct test of request cancellation
This commit is contained in:
@@ -20,11 +20,11 @@ pub trait System: Debug + 'static {
|
||||
fn env(&self) -> impl Future<Output = Vec<GenMember>> { futures::future::ready(Vec::new()) }
|
||||
fn lexers(&self) -> Vec<LexerObj> { Vec::new() }
|
||||
fn parsers(&self) -> Vec<ParserObj> { Vec::new() }
|
||||
fn request<'a>(
|
||||
fn request(
|
||||
&self,
|
||||
hand: Box<dyn ReqHandle<'a> + 'a>,
|
||||
hand: Box<dyn ReqHandle>,
|
||||
req: ReqForSystem<Self>,
|
||||
) -> impl Future<Output = Receipt<'a>>;
|
||||
) -> impl Future<Output = Receipt>;
|
||||
}
|
||||
|
||||
pub trait DynSystem: Debug + 'static {
|
||||
@@ -32,10 +32,7 @@ pub trait DynSystem: Debug + 'static {
|
||||
fn dyn_env(&self) -> LocalBoxFuture<'_, Vec<GenMember>>;
|
||||
fn dyn_lexers(&self) -> Vec<LexerObj>;
|
||||
fn dyn_parsers(&self) -> Vec<ParserObj>;
|
||||
fn dyn_request<'a, 'b: 'a>(
|
||||
&'a self,
|
||||
hand: Box<dyn ReqReader<'b> + 'b>,
|
||||
) -> LocalBoxFuture<'a, Receipt<'b>>;
|
||||
fn dyn_request<'a, 'b: 'a>(&'a self, hand: Box<dyn ReqReader>) -> LocalBoxFuture<'a, Receipt>;
|
||||
fn card(&self) -> Box<dyn DynSystemCard>;
|
||||
}
|
||||
|
||||
@@ -46,8 +43,8 @@ impl<T: System> DynSystem for T {
|
||||
fn dyn_parsers(&self) -> Vec<ParserObj> { self.parsers() }
|
||||
fn dyn_request<'a, 'b: 'a>(
|
||||
&'a self,
|
||||
mut hand: Box<dyn ReqReader<'b> + 'b>,
|
||||
) -> LocalBoxFuture<'a, Receipt<'b>> {
|
||||
mut hand: Box<dyn ReqReader>,
|
||||
) -> LocalBoxFuture<'a, Receipt> {
|
||||
Box::pin(async move {
|
||||
let value = hand.read_req().await.unwrap();
|
||||
self.request(hand.finish().await, value).await
|
||||
|
||||
Reference in New Issue
Block a user