aboutsummaryrefslogtreecommitdiff
path: root/src/wrapper.rs
diff options
context:
space:
mode:
authorJoey Sacchini <joey@sacchini.net>2020-12-02 19:28:56 -0500
committerJoey Sacchini <joey@sacchini.net>2020-12-02 19:28:56 -0500
commita75dccefd966560793e9776bc44d09fa22733a43 (patch)
tree7b99ebeaac6726f5141babbedd4b41c27ba3e586 /src/wrapper.rs
downloadcraftio-rs-a75dccefd966560793e9776bc44d09fa22733a43.tar.gz
craftio-rs-a75dccefd966560793e9776bc44d09fa22733a43.tar.bz2
craftio-rs-a75dccefd966560793e9776bc44d09fa22733a43.zip
init commit
Diffstat (limited to 'src/wrapper.rs')
-rw-r--r--src/wrapper.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wrapper.rs b/src/wrapper.rs
new file mode 100644
index 0000000..06f451b
--- /dev/null
+++ b/src/wrapper.rs
@@ -0,0 +1,12 @@
+use crate::cfb8::CipherError;
+use mcproto_rs::protocol::State;
+
+pub trait CraftWrapper<I> {
+ fn into_inner(self) -> I;
+}
+
+pub trait CraftIo {
+ fn set_state(&mut self, next: State);
+ fn set_compression_threshold(&mut self, threshold: Option<i32>);
+ fn enable_encryption(&mut self, key: &[u8], iv: &[u8]) -> Result<(), CipherError>;
+}