Implement code for recieving the answer to a query
This commit is contained in:
10
tests/mod.rs
10
tests/mod.rs
@@ -21,6 +21,8 @@ use eagle::Protocol;
|
||||
enum TestProtocol {
|
||||
Addition((i32, i32), i32),
|
||||
SomeKindOfQuestion(String, i32),
|
||||
ThisRespondsWithAString(i32, String),
|
||||
Void((), ()),
|
||||
}
|
||||
|
||||
struct DummyServer;
|
||||
@@ -32,6 +34,14 @@ impl TestProtocolServer for DummyServer {
|
||||
fn addition(&mut self, a: i32, b: i32) -> i32 {
|
||||
a + b
|
||||
}
|
||||
|
||||
fn this_responds_with_a_string(&mut self, arg: i32) -> String {
|
||||
format!("The number is {}", arg)
|
||||
}
|
||||
|
||||
fn void(&mut self) {
|
||||
println!("Void function called!")
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
Reference in New Issue
Block a user