pub struct TabCapabilities {
pub can_execute_js: bool,
pub can_local_storage: bool,
pub can_timers: bool,
pub can_network: bool,
pub can_post_message: bool,
pub can_geolocation: bool,
pub can_clipboard: bool,
pub can_notifications: bool,
pub can_media_devices: bool,
pub can_popups: bool,
}Expand description
Capabilities bitmap for tab sandboxing
Fields§
§can_execute_js: boolCan execute JavaScript
can_local_storage: boolCan access localStorage
can_timers: boolCan use timers (setTimeout/setInterval)
can_network: boolCan make network requests
can_post_message: boolCan use postMessage to other tabs
can_geolocation: boolCan use geolocation (future)
can_clipboard: boolCan use clipboard
can_notifications: boolCan use notifications
can_media_devices: boolCan access camera/microphone (future)
can_popups: boolCan create popups / new windows
Implementations§
Source§impl TabCapabilities
impl TabCapabilities
Sourcepub fn default_web() -> Self
pub fn default_web() -> Self
Default capabilities for a web page
Sourcepub fn apply_sandbox_flags(&mut self, flags: &str)
pub fn apply_sandbox_flags(&mut self, flags: &str)
Apply sandbox flags (like HTML sandbox attribute)
Sourcepub fn enabled_count(&self) -> usize
pub fn enabled_count(&self) -> usize
Count of enabled capabilities
Trait Implementations§
Source§impl Clone for TabCapabilities
impl Clone for TabCapabilities
Source§fn clone(&self) -> TabCapabilities
fn clone(&self) -> TabCapabilities
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TabCapabilities
impl RefUnwindSafe for TabCapabilities
impl Send for TabCapabilities
impl Sync for TabCapabilities
impl Unpin for TabCapabilities
impl UnwindSafe for TabCapabilities
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)