We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0 parents commit c5b7296Copy full SHA for c5b7296
.gitignore
@@ -0,0 +1 @@
1
+/target
Cargo.toml
@@ -0,0 +1,8 @@
+[package]
2
+name = "ledswarm_protocol"
3
+version = "0.1.0"
4
+edition = "2021"
5
+
6
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
8
+[dependencies]
src/lib.rs
@@ -0,0 +1,23 @@
+pub fn add(left: usize, right: usize) -> usize {
+ left + right
+}
+pub enum Message {
+ /// Initiate a WebSocket session with the master node.
+ Hello,
+ /// Terminate the socket session.
9
+ Farewell,
10
+ /// Synchronize controller time.
11
+ Tick(u16),
12
13
14
+#[cfg(test)]
15
+mod tests {
16
+ use super::*;
17
18
+ #[test]
19
+ fn it_works() {
20
+ let result = add(2, 2);
21
+ assert_eq!(result, 4);
22
+ }
23
0 commit comments