1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#![allow(dead_code)]
use fidl::endpoints::RequestStream;
use fidl_fidl_test_protocolmethodremove as fidl_lib;
use fuchsia_async as fasync;
use futures::prelude::*;
struct ExampleFakeProxy;
impl fidl_lib::ExampleProxyInterface for ExampleFakeProxy {
fn existing_method(&self) -> Result<(), fidl::Error> {
Ok(())
}
fn old_method(&self) -> Result<(), fidl::Error> {
Ok(())
}
}
async fn example_service(chan: fasync::Channel) -> Result<(), fidl::Error> {
let mut stream = fidl_lib::ExampleRequestStream::from_channel(chan);
while let Some(req) = stream.try_next().await? {
match req {
fidl_lib::ExampleRequest::ExistingMethod { .. } => {}
fidl_lib::ExampleRequest::OldMethod { .. } => {}
}
}
Ok(())
}
fn main() {}