cometd-client 0.3.0-alpha.4

Client for LongPolling CometD connections
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use cookie::{Cookie, CookieJar};

pub(crate) trait CookieJarExt {
    fn make_string(&self) -> Box<str>;
}

impl CookieJarExt for CookieJar {
    fn make_string(&self) -> Box<str> {
        self.iter()
            .map(Cookie::name_value)
            .map(|(name, value)| format!("{name}={value}"))
            .collect::<Box<[_]>>()
            .join("; ")
            .into_boxed_str()
    }
}