summary refs log tree commit diff stats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0f74cf8..93ba6d6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -314,6 +314,7 @@ pub struct Eat {
 }
 
 /// A command hook handle.
+#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"]
 pub struct CommandHookHandle {
     ph: *mut internals::Ph,
     hh: *const internals::HexchatHook,
@@ -322,6 +323,7 @@ pub struct CommandHookHandle {
 }
 
 /// A server hook handle.
+#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"]
 pub struct ServerHookHandle {
     ph: *mut internals::Ph,
     hh: *const internals::HexchatHook,
@@ -330,6 +332,7 @@ pub struct ServerHookHandle {
 }
 
 /// A print hook handle.
+#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"]
 pub struct PrintHookHandle {
     ph: *mut internals::Ph,
     hh: *const internals::HexchatHook,
@@ -338,6 +341,7 @@ pub struct PrintHookHandle {
 }
 
 /// A timer hook handle.
+#[must_use = "Hooks must be stored somewhere and are automatically unhooked on Drop"]
 pub struct TimerHookHandle {
     ph: *mut internals::Ph,
     hh: *const internals::HexchatHook,