Skip to main content

rustenium_cdp_definitions/browser_protocol/cache_storage/
results.rs

1use serde::{Deserialize, Serialize};
2#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
3pub struct DeleteCacheResult {}
4impl TryFrom<serde_json::Value> for DeleteCacheResult {
5    type Error = serde_json::Error;
6    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
7        serde_json::from_value(value)
8    }
9}
10#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
11pub struct DeleteEntryResult {}
12impl TryFrom<serde_json::Value> for DeleteEntryResult {
13    type Error = serde_json::Error;
14    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
15        serde_json::from_value(value)
16    }
17}
18#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
19pub struct RequestCacheNamesResult {
20    #[doc = "Caches for the security origin."]
21    #[serde(rename = "caches")]
22    #[serde(skip_serializing_if = "Vec::is_empty")]
23    pub caches: Vec<super::types::Cache>,
24}
25impl TryFrom<serde_json::Value> for RequestCacheNamesResult {
26    type Error = serde_json::Error;
27    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
28        serde_json::from_value(value)
29    }
30}
31#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
32pub struct RequestCachedResponseResult {
33    #[doc = "Response read from the cache."]
34    #[serde(rename = "response")]
35    pub response: super::types::CachedResponse,
36}
37impl TryFrom<serde_json::Value> for RequestCachedResponseResult {
38    type Error = serde_json::Error;
39    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
40        serde_json::from_value(value)
41    }
42}
43#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
44pub struct RequestEntriesResult {
45    #[doc = "Array of object store data entries."]
46    #[serde(rename = "cacheDataEntries")]
47    #[serde(skip_serializing_if = "Vec::is_empty")]
48    pub cache_data_entries: Vec<super::types::DataEntry>,
49    #[doc = "Count of returned entries from this storage. If pathFilter is empty, it\nis the count of all entries from this storage."]
50    #[serde(rename = "returnCount")]
51    pub return_count: f64,
52}
53impl TryFrom<serde_json::Value> for RequestEntriesResult {
54    type Error = serde_json::Error;
55    fn try_from(value: serde_json::Value) -> Result<Self, Self::Error> {
56        serde_json::from_value(value)
57    }
58}