pookie 0.1.0

Load cookies from web browsers
Documentation
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug)]
pub struct Cookie {
    pub domain: String,
    pub path: String,
    pub secure: bool,
    pub expires: Option<i64>,
    pub name: String,
    pub value: String,
    pub http_only: bool,
    pub same_site: i64,
}

pub trait CookieToString {
    fn to_string(&self) -> String;
}

impl CookieToString for Vec<Cookie> {
    fn to_string(&self) -> String {
        self.iter()
            .map(|cookie| format!("{}={}", cookie.name, cookie.value))
            .collect::<Vec<String>>()
            .join(";")
    }
}