Struct net::storage_thread::StorageManager
source · struct StorageManager {
port: IpcReceiver<StorageThreadMsg>,
session_data: HashMap<String, (usize, BTreeMap<String, String>)>,
local_data: HashMap<String, (usize, BTreeMap<String, String>)>,
config_dir: Option<PathBuf>,
}
Fields§
§port: IpcReceiver<StorageThreadMsg>
§session_data: HashMap<String, (usize, BTreeMap<String, String>)>
§local_data: HashMap<String, (usize, BTreeMap<String, String>)>
§config_dir: Option<PathBuf>
Implementations§
source§impl StorageManager
impl StorageManager
fn new( port: IpcReceiver<StorageThreadMsg>, config_dir: Option<PathBuf>, ) -> StorageManager
source§impl StorageManager
impl StorageManager
fn start(&mut self)
fn save_state(&self)
fn select_data( &self, storage_type: StorageType, ) -> &HashMap<String, (usize, BTreeMap<String, String>)>
fn select_data_mut( &mut self, storage_type: StorageType, ) -> &mut HashMap<String, (usize, BTreeMap<String, String>)>
fn length( &self, sender: IpcSender<usize>, url: ServoUrl, storage_type: StorageType, )
fn key( &self, sender: IpcSender<Option<String>>, url: ServoUrl, storage_type: StorageType, index: u32, )
fn keys( &self, sender: IpcSender<Vec<String>>, url: ServoUrl, storage_type: StorageType, )
sourcefn set_item(
&mut self,
sender: IpcSender<Result<(bool, Option<String>), ()>>,
url: ServoUrl,
storage_type: StorageType,
name: String,
value: String,
)
fn set_item( &mut self, sender: IpcSender<Result<(bool, Option<String>), ()>>, url: ServoUrl, storage_type: StorageType, name: String, value: String, )
Sends Ok(changed, Some(old_value)) in case there was a previous value with the same key name but with different value name otherwise sends Err(()) to indicate that the operation would result in exceeding the quota limit
fn request_item( &self, sender: IpcSender<Option<String>>, url: ServoUrl, storage_type: StorageType, name: String, )
sourcefn remove_item(
&mut self,
sender: IpcSender<Option<String>>,
url: ServoUrl,
storage_type: StorageType,
name: String,
)
fn remove_item( &mut self, sender: IpcSender<Option<String>>, url: ServoUrl, storage_type: StorageType, name: String, )
Sends Some(old_value) in case there was a previous value with the key name, otherwise sends None
fn clear( &mut self, sender: IpcSender<bool>, url: ServoUrl, storage_type: StorageType, )
fn origin_as_string(&self, url: ServoUrl) -> String
Auto Trait Implementations§
impl !Freeze for StorageManager
impl !RefUnwindSafe for StorageManager
impl Send for StorageManager
impl !Sync for StorageManager
impl Unpin for StorageManager
impl UnwindSafe for StorageManager
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more