storage/webstorage/engines/
mod.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5use crate::webstorage::OriginEntry;
6
7pub mod sqlite;
8
9pub trait WebStorageEngine {
10    type Error;
11    fn load(&self) -> Result<OriginEntry, Self::Error>;
12    fn clear(&mut self) -> Result<(), Self::Error>;
13    fn delete(&mut self, key: &str) -> Result<(), Self::Error>;
14    fn set(&mut self, key: &str, value: &str) -> Result<(), Self::Error>;
15    fn save(&mut self, data: &OriginEntry);
16}