From 0bbc0894806e4b82d7f863bbca52272f11978d64 Mon Sep 17 00:00:00 2001 From: xmppftw Date: Fri, 29 Dec 2023 21:41:09 +0100 Subject: [PATCH] Move ClientFeature to feature module --- xmpp/src/feature.rs | 13 +++++++++++++ xmpp/src/lib.rs | 10 ++-------- 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 xmpp/src/feature.rs diff --git a/xmpp/src/feature.rs b/xmpp/src/feature.rs new file mode 100644 index 0000000..35ff2f4 --- /dev/null +++ b/xmpp/src/feature.rs @@ -0,0 +1,13 @@ +// Copyright (c) 2023 xmpp-rs contributors. +// +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#[derive(PartialEq)] +pub enum ClientFeature { + #[cfg(feature = "avatars")] + Avatars, + ContactList, + JoinRooms, +} diff --git a/xmpp/src/lib.rs b/xmpp/src/lib.rs index ab28fe6..467a6ef 100644 --- a/xmpp/src/lib.rs +++ b/xmpp/src/lib.rs @@ -33,6 +33,7 @@ pub use tokio_xmpp::{BareJid, Element, FullJid, Jid}; extern crate log; pub mod builder; +pub mod feature; pub mod iq; pub mod message; pub mod presence; @@ -41,19 +42,12 @@ pub mod upload; // Module re-exports pub use builder::{ClientBuilder, ClientType}; +pub use feature::ClientFeature; pub type Error = tokio_xmpp::Error; pub type Id = Option; pub type RoomNick = String; -#[derive(PartialEq)] -pub enum ClientFeature { - #[cfg(feature = "avatars")] - Avatars, - ContactList, - JoinRooms, -} - #[derive(Debug)] pub enum Event { Online,