diff options
author | cel 🌸 <cel@blos.sm> | 2023-06-19 19:23:54 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-06-19 19:23:54 +0100 |
commit | 6a5e39c60ad74c1cba84daa7c845c8f0237a5d28 (patch) | |
tree | 7115e5dc2679bc053acb9b28fed41d3175ed2817 /src/stanza/stream.rs | |
parent | abc3ffa7363ebd30101e15db7e02a7d44f323df9 (diff) | |
download | luz-6a5e39c60ad74c1cba84daa7c845c8f0237a5d28.tar.gz luz-6a5e39c60ad74c1cba84daa7c845c8f0237a5d28.tar.bz2 luz-6a5e39c60ad74c1cba84daa7c845c8f0237a5d28.zip |
implement starttls
Diffstat (limited to '')
-rw-r--r-- | src/stanza/stream.rs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/stanza/stream.rs b/src/stanza/stream.rs new file mode 100644 index 0000000..dde741d --- /dev/null +++ b/src/stanza/stream.rs @@ -0,0 +1,36 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize)] +#[serde(rename = "stream:stream")] +struct Stream { + #[serde(rename = "@from")] + from: Option<String>, + #[serde(rename = "@id")] + id: Option<String>, + #[serde(rename = "@to")] + to: Option<String>, + #[serde(rename = "@version")] + version: Option<f32>, + #[serde(rename = "@xml:lang")] + lang: Option<String>, + #[serde(rename = "@xmlns")] + namespace: Option<String>, + #[serde(rename = "@xmlns:stream")] + stream_namespace: Option<String>, +} + +#[derive(Deserialize, Debug)] +#[serde(rename = "stream:features")] +pub struct StreamFeatures { + #[serde(rename = "$value")] + pub features: Vec<StreamFeature>, +} + +#[derive(Deserialize, PartialEq, Debug)] +pub enum StreamFeature { + #[serde(rename = "starttls")] + StartTls, + // TODO: other stream features + Sasl, + Bind, +} |