aboutsummaryrefslogtreecommitdiff
path: root/src/wrapper.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrapper.rs')
-rw-r--r--src/wrapper.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wrapper.rs b/src/wrapper.rs
index 06f451b..71ff7da 100644
--- a/src/wrapper.rs
+++ b/src/wrapper.rs
@@ -1,3 +1,4 @@
+#[cfg(feature = "encryption")]
use crate::cfb8::CipherError;
use mcproto_rs::protocol::State;
@@ -6,7 +7,12 @@ pub trait CraftWrapper<I> {
}
pub trait CraftIo {
+
fn set_state(&mut self, next: State);
+
+ #[cfg(feature = "compression")]
fn set_compression_threshold(&mut self, threshold: Option<i32>);
+
+ #[cfg(feature = "encryption")]
fn enable_encryption(&mut self, key: &[u8], iv: &[u8]) -> Result<(), CipherError>;
}