pub struct PermissionRequestedArgs(/* private fields */);Expand description
Details about a permission a page is requesting (for example camera or
geolocation access), delivered to a WebView::on_permission_requested
handler. Decide the outcome with set_state.
Implementations§
Source§impl PermissionRequestedArgs
impl PermissionRequestedArgs
Sourcepub fn kind(&self) -> PermissionKind
pub fn kind(&self) -> PermissionKind
Returns the kind of permission being requested.
Sourcepub fn is_user_initiated(&self) -> bool
pub fn is_user_initiated(&self) -> bool
Returns true if the request was initiated by the user rather than by
script.
Sourcepub fn state(&self) -> PermissionState
pub fn state(&self) -> PermissionState
Returns the current resolution state of the request.
Sourcepub fn set_state(&self, state: PermissionState) -> Result<()>
pub fn set_state(&self, state: PermissionState) -> Result<()>
Sets how the request should be resolved.
Auto Trait Implementations§
impl !Send for PermissionRequestedArgs
impl !Sync for PermissionRequestedArgs
impl Freeze for PermissionRequestedArgs
impl RefUnwindSafe for PermissionRequestedArgs
impl Unpin for PermissionRequestedArgs
impl UnsafeUnpin for PermissionRequestedArgs
impl UnwindSafe for PermissionRequestedArgs
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