pub struct SiteDataManager {
public_resource_threads: ResourceThreads,
private_resource_threads: ResourceThreads,
public_storage_threads: StorageThreads,
private_storage_threads: StorageThreads,
}Expand description
Provides APIs for inspecting and managing site data.
SiteDataManager exposes information about data that is conceptually
associated with a site (equivalent to an eTLD+1), such as web exposed
storage mechanisms like localStorage and sessionStorage.
The manager can be used by embedders to list sites with stored data. Support for site scoped management operations (e.g. clearing data for a specific site) will be added in the future.
Note: Network layer state (such as the HTTP cache) is intentionally not
handled by SiteDataManager. That functionality lives in NetworkManager.
Fields§
§public_resource_threads: ResourceThreads§private_resource_threads: ResourceThreads§public_storage_threads: StorageThreads§private_storage_threads: StorageThreadsImplementations§
Source§impl SiteDataManager
impl SiteDataManager
pub(crate) fn new( public_resource_threads: ResourceThreads, private_resource_threads: ResourceThreads, public_storage_threads: StorageThreads, private_storage_threads: StorageThreads, ) -> Self
Sourcepub fn site_data(&self, storage_types: StorageType) -> Vec<SiteData>
pub fn site_data(&self, storage_types: StorageType) -> Vec<SiteData>
Return a list of sites that have associated site data.
The returned list is filtered by the provided storage_types bitflags.
Each SiteData entry represents a site (equivalent to an eTLD+1)
and indicates which kinds of storage data are present for it (e.g.
localStorage, sessionStorage).
The returned list is sorted by site name.
Both public and private storage are included in the result.
Sourcepub fn clear_site_data(&self, sites: &[&str], storage_types: StorageType)
pub fn clear_site_data(&self, sites: &[&str], storage_types: StorageType)
Clear site data for the given sites.
The clearing is restricted to the provided storage_types bitflags.
Both public and private browsing data are affected.
Auto Trait Implementations§
impl Freeze for SiteDataManager
impl !RefUnwindSafe for SiteDataManager
impl Send for SiteDataManager
impl !Sync for SiteDataManager
impl Unpin for SiteDataManager
impl !UnwindSafe for SiteDataManager
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
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