pub struct GrantPermissionsCommand { /* private fields */ }
Available on crate features
Browser
and experimental
only.Expand description
Grant specific permissions to the given origin and reject all others.
Implementations§
Source§impl GrantPermissionsCommand
impl GrantPermissionsCommand
pub fn new( permissions: Vec<JsonValue>, origin: Option<String>, browser_context_id: Option<JsonValue>, ) -> Self
pub fn permissions(&self) -> &[JsonValue]
Sourcepub fn origin(&self) -> Option<&String>
pub fn origin(&self) -> Option<&String>
Origin the permission applies to, all origins if not specified.
Sourcepub fn browser_context_id(&self) -> Option<&JsonValue>
pub fn browser_context_id(&self) -> Option<&JsonValue>
BrowserContext to override permissions. When omitted, default browser context is used.
Trait Implementations§
Source§impl Clone for GrantPermissionsCommand
impl Clone for GrantPermissionsCommand
Source§fn clone(&self) -> GrantPermissionsCommand
fn clone(&self) -> GrantPermissionsCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Command for GrantPermissionsCommand
impl Command for GrantPermissionsCommand
Source§impl Debug for GrantPermissionsCommand
impl Debug for GrantPermissionsCommand
Source§impl<'de> Deserialize<'de> for GrantPermissionsCommand
impl<'de> Deserialize<'de> for GrantPermissionsCommand
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GrantPermissionsCommand
impl RefUnwindSafe for GrantPermissionsCommand
impl Send for GrantPermissionsCommand
impl Sync for GrantPermissionsCommand
impl Unpin for GrantPermissionsCommand
impl UnwindSafe for GrantPermissionsCommand
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