Skip to content

Commit 76ac1f9

Browse files
committed
add stub set_pipeline methods
1 parent 39b91ea commit 76ac1f9

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

capnp-rpc/src/local.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ impl ResultsHook for Results {
126126
}
127127
}
128128

129+
fn set_pipeline(&mut self, pipeline: Box<dyn PipelineHook>) {
130+
todo!()
131+
}
132+
129133
fn on_tail_call(&mut self) -> Promise<any_pointer::Pipeline, crate::Error> {
130134
todo!()
131135
}

capnp-rpc/src/rpc.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,6 +2295,10 @@ impl<VatId> ResultsHook for Results<VatId> {
22952295
}
22962296
}
22972297

2298+
fn set_pipeline(&mut self, pipeline: Box<dyn PipelineHook>) {
2299+
todo!()
2300+
}
2301+
22982302
fn on_tail_call(&mut self) -> Promise<any_pointer::Pipeline, crate::Error> {
22992303
todo!()
23002304
}

capnp/src/capability.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pub struct Results<T> {
223223

224224
impl<T> Results<T>
225225
where
226-
T: Owned,
226+
T: Owned + Pipelined,
227227
{
228228
pub fn new(hook: Box<dyn ResultsHook>) -> Self {
229229
Self {
@@ -240,9 +240,12 @@ where
240240
self.hook.get().unwrap().set_as(other)
241241
}
242242

243-
pub fn tail_call<SubParams>(self, tail_request: Request<SubParams, T>)
244-
-> Promise<(), Error>
245-
{
243+
pub fn set_pipeline(&mut self, pipeline: T::Pipeline) {
244+
// How do we get a PipelineHook out of `pipeline`?
245+
//self.hook.set_pipeline(pipeline)
246+
}
247+
248+
pub fn tail_call<SubParams>(self, tail_request: Request<SubParams, T>) -> Promise<(), Error> {
246249
self.hook.tail_call(tail_request.hook)
247250
}
248251
}

capnp/src/private/capability.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ pub trait ResultsHook {
9595
fn get(&mut self) -> crate::Result<any_pointer::Builder<'_>>;
9696
fn allow_cancellation(&self);
9797

98+
fn tail_call(self: Box<Self>, request: Box<dyn RequestHook>) -> Promise<(), crate::Error>;
99+
fn set_pipeline(&mut self, pipeline: Box<dyn PipelineHook>);
100+
98101
fn on_tail_call(&mut self) -> Promise<any_pointer::Pipeline, crate::Error>;
99102

100-
fn tail_call(self: Box<Self>, request: Box<dyn RequestHook>) -> Promise<(), crate::Error>;
101103
fn direct_tail_call(
102104
self: Box<Self>,
103105
request: Box<dyn RequestHook>,

0 commit comments

Comments
 (0)