2024-06-19 23:25:45 +02:00
|
|
|
/*
|
2024-06-19 23:27:10 +02:00
|
|
|
Eagle - A library for easy communication in full-stack Rust applications
|
2024-06-19 23:25:45 +02:00
|
|
|
Copyright (c) 2024 KodiCraft
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
use eagle::Protocol;
|
|
|
|
|
|
|
|
#[derive(Protocol)]
|
|
|
|
enum TestProtocol {
|
|
|
|
Addition((i32, i32), i32),
|
|
|
|
SomeKindOfQuestion(String, i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
struct DummyServer;
|
|
|
|
impl TestProtocolServer for DummyServer {
|
|
|
|
fn some_kind_of_question(&mut self, question: String) -> i32 {
|
|
|
|
question.len() as i32
|
|
|
|
}
|
|
|
|
|
|
|
|
fn addition(&mut self, arg0: i32, arg1: i32) -> i32 {
|
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
}
|
2024-06-20 11:34:04 +02:00
|
|
|
|
|
|
|
fn main() {}
|