src/body.rs 🔗
@@ -4,7 +4,7 @@ use error::Error;
use ns;
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Body {
pub body: String,
}
Emmanuel Gil Peyrot created
src/body.rs | 2 +-
src/chatstates.rs | 2 +-
src/data_forms.rs | 6 +++---
src/disco.rs | 6 +++---
src/ibb.rs | 4 ++--
src/jingle.rs | 14 +++++++-------
src/media_element.rs | 4 ++--
src/ping.rs | 2 +-
src/receipts.rs | 2 +-
9 files changed, 21 insertions(+), 21 deletions(-)
@@ -4,7 +4,7 @@ use error::Error;
use ns;
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Body {
pub body: String,
}
@@ -4,7 +4,7 @@ use error::Error;
use ns;
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub enum ChatState {
Active,
Composing,
@@ -9,7 +9,7 @@ use ns;
use media_element::{MediaElement, parse_media_element};
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Field {
pub var: String,
pub type_: String, // TODO: use an enum here.
@@ -18,7 +18,7 @@ pub struct Field {
pub media: Vec<MediaElement>,
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
pub enum DataFormType {
Cancel,
Form,
@@ -44,7 +44,7 @@ impl FromStr for DataFormType {
}
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct DataForm {
pub type_: DataFormType,
pub form_type: Option<String>,
@@ -7,12 +7,12 @@ use ns;
use data_forms::{DataForm, DataFormType, parse_data_form};
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
pub struct Feature {
pub var: String,
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Identity {
pub category: String, // TODO: use an enum here.
pub type_: String, // TODO: use an enum here.
@@ -20,7 +20,7 @@ pub struct Identity {
pub name: Option<String>,
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Disco {
pub node: Option<String>,
pub identities: Vec<Identity>,
@@ -6,7 +6,7 @@ use error::Error;
use ns;
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub enum Stanza {
Iq,
Message,
@@ -32,7 +32,7 @@ impl FromStr for Stanza {
}
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub enum IBB {
Open { block_size: u16, sid: String, stanza: Stanza },
Data(u16, String, Vec<u8>),
@@ -7,7 +7,7 @@ use minidom::Element;
use error::Error;
use ns;
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
pub enum Action {
ContentAccept,
ContentAdd,
@@ -69,7 +69,7 @@ impl FromStr for Action {
// TODO: use a real JID type.
type Jid = String;
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
pub enum Creator {
Initiator,
Responder,
@@ -89,7 +89,7 @@ impl FromStr for Creator {
}
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
pub enum Senders {
Both,
Initiator,
@@ -115,7 +115,7 @@ impl FromStr for Senders {
}
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Content {
pub creator: Creator,
pub disposition: String,
@@ -126,7 +126,7 @@ pub struct Content {
pub security: Option<String>,
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Clone, PartialEq)]
pub enum Reason {
AlternativeSession, //(String),
Busy,
@@ -191,13 +191,13 @@ impl FromStr for Reason {
}
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct ReasonElement {
pub reason: Reason,
pub text: Option<String>,
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Jingle {
pub action: Action,
pub initiator: Option<Jid>,
@@ -4,13 +4,13 @@ use error::Error;
use ns;
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct URI {
pub type_: String,
pub uri: String,
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct MediaElement {
pub width: Option<usize>,
pub height: Option<usize>,
@@ -4,7 +4,7 @@ use error::Error;
use ns;
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Ping {
}
@@ -4,7 +4,7 @@ use error::Error;
use ns;
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub enum Receipt {
Request,
Received(String),