blob: dde741d532896ac1fd1b148b0fb1bc50a7174840 (
plain) (
tree)
|
|
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,
}
|