rustenium_bidi_definitions/storage/
results.rs1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3pub struct GetCookiesResult {
4 #[serde(rename = "cookies")]
5 #[serde(skip_serializing_if = "Vec::is_empty")]
6 pub cookies: Vec<crate::network::types::Cookie>,
7 #[serde(rename = "partitionKey")]
8 pub partition_key: super::types::PartitionKey,
9}
10impl TryFrom<serde_json::Value> for GetCookiesResult {
11 type Error = serde_json::Error;
12 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
13 serde_json::from_value(value)
14 }
15}
16#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
17pub struct SetCookieResult {
18 #[serde(rename = "partitionKey")]
19 pub partition_key: super::types::PartitionKey,
20}
21impl TryFrom<serde_json::Value> for SetCookieResult {
22 type Error = serde_json::Error;
23 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
24 serde_json::from_value(value)
25 }
26}
27#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
28pub struct DeleteCookiesResult {
29 #[serde(rename = "partitionKey")]
30 pub partition_key: super::types::PartitionKey,
31}
32impl TryFrom<serde_json::Value> for DeleteCookiesResult {
33 type Error = serde_json::Error;
34 fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
35 serde_json::from_value(value)
36 }
37}