pub enum StorageThreadMsg {
Length(GenericSender<usize>, StorageType, WebViewId, ServoUrl),
Key(GenericSender<Option<String>>, StorageType, WebViewId, ServoUrl, u32),
Keys(GenericSender<Vec<String>>, StorageType, WebViewId, ServoUrl),
GetItem(GenericSender<Option<String>>, StorageType, WebViewId, ServoUrl, String),
SetItem(GenericSender<Result<(bool, Option<String>), ()>>, StorageType, WebViewId, ServoUrl, String, String),
RemoveItem(GenericSender<Option<String>>, StorageType, WebViewId, ServoUrl, String),
Clear(GenericSender<bool>, StorageType, WebViewId, ServoUrl),
Clone {
sender: GenericSender<()>,
src: WebViewId,
dest: WebViewId,
},
Exit(GenericSender<()>),
CollectMemoryReport(ReportsChan),
}
Expand description
Request operations on the storage data associated with a particular url
Variants§
Length(GenericSender<usize>, StorageType, WebViewId, ServoUrl)
gets the number of key/value pairs present in the associated storage data
Key(GenericSender<Option<String>>, StorageType, WebViewId, ServoUrl, u32)
gets the name of the key at the specified index in the associated storage data
Keys(GenericSender<Vec<String>>, StorageType, WebViewId, ServoUrl)
Gets the available keys in the associated storage data
GetItem(GenericSender<Option<String>>, StorageType, WebViewId, ServoUrl, String)
gets the value associated with the given key in the associated storage data
SetItem(GenericSender<Result<(bool, Option<String>), ()>>, StorageType, WebViewId, ServoUrl, String, String)
sets the value of the given key in the associated storage data
RemoveItem(GenericSender<Option<String>>, StorageType, WebViewId, ServoUrl, String)
removes the key/value pair for the given key in the associated storage data
Clear(GenericSender<bool>, StorageType, WebViewId, ServoUrl)
clears the associated storage data by removing all the key/value pairs
Clone
clones all storage data of the given top-level browsing context for a new browsing context. should only be used for sessionStorage.
Exit(GenericSender<()>)
send a reply when done cleaning up thread resources and then shut it down
CollectMemoryReport(ReportsChan)
Measure memory used by this thread and send the report over the provided channel.
Trait Implementations§
Source§impl Debug for StorageThreadMsg
impl Debug for StorageThreadMsg
Source§impl<'de> Deserialize<'de> for StorageThreadMsg
impl<'de> Deserialize<'de> for StorageThreadMsg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl GenericSend<StorageThreadMsg> for ResourceThreads
impl GenericSend<StorageThreadMsg> for ResourceThreads
Source§fn send(&self, msg: StorageThreadMsg) -> SendResult
fn send(&self, msg: StorageThreadMsg) -> SendResult
Source§fn sender(&self) -> GenericSender<StorageThreadMsg>
fn sender(&self) -> GenericSender<StorageThreadMsg>
Auto Trait Implementations§
impl Freeze for StorageThreadMsg
impl !RefUnwindSafe for StorageThreadMsg
impl Send for StorageThreadMsg
impl !Sync for StorageThreadMsg
impl Unpin for StorageThreadMsg
impl UnwindSafe for StorageThreadMsg
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
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>
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>
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