// This file is part of Hexchat Plugin API Bindings for Rust // Copyright (C) 2018, 2021 Soni L. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . /// A status indicator for event callbacks. Indicates whether to continue processing, eat hexchat, /// eat plugin, or eat all. /// /// Returned by most hooks. #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub struct Eat { pub(crate) do_eat: i32, } /// Equivalent to HEXCHAT_EAT_NONE. pub const EAT_NONE: Eat = Eat { do_eat: 0 }; /// Equivalent to HEXCHAT_EAT_HEXCHAT. pub const EAT_HEXCHAT: Eat = Eat { do_eat: 1 }; /// Equivalent to HEXCHAT_EAT_PLUGIN. pub const EAT_PLUGIN: Eat = Eat { do_eat: 2 }; /// Equivalent to HEXCHAT_EAT_ALL. pub const EAT_ALL: Eat = Eat { do_eat: 1 | 2 };