pub struct PermissionStateQuery { /* private fields */ }Expand description
This query represents a user’s choice to allow or deny access to “powerful features” of the platform, as specified in the Permissions W3C Specification.
When signalled by the WebView through the query-permission-state signal, the application
has to eventually respond, via [finish()][Self::finish()], whether it grants,
denies or requests a dedicated permission prompt for the given query.
When a PermissionStateQuery is not handled by the user, the user-agent is instructed to
prompt the user for the given permission.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl PermissionStateQuery
impl PermissionStateQuery
Sourcepub fn as_ptr(&self) -> *mut WebKitPermissionStateQuery
pub fn as_ptr(&self) -> *mut WebKitPermissionStateQuery
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(
ptr: &*mut WebKitPermissionStateQuery,
) -> &Self
pub unsafe fn from_glib_ptr_borrow( ptr: &*mut WebKitPermissionStateQuery, ) -> &Self
Borrows the underlying C value.
Source§impl PermissionStateQuery
impl PermissionStateQuery
Sourcepub fn finish(&self, state: PermissionState)
pub fn finish(&self, state: PermissionState)
Notify the web-engine of the selected permission state for the given query. This function should
only be called as a response to the WebKitWebView::query-permission-state signal.
§state
Sourcepub fn security_origin(&self) -> Option<SecurityOrigin>
pub fn security_origin(&self) -> Option<SecurityOrigin>
Get the permission origin for which access is being queried.
§Returns
A SecurityOrigin representing the origin from which the
self was emitted.
Trait Implementations§
Source§impl Clone for PermissionStateQuery
impl Clone for PermissionStateQuery
Source§impl Debug for PermissionStateQuery
impl Debug for PermissionStateQuery
Source§impl From<PermissionStateQuery> for Value
impl From<PermissionStateQuery> for Value
Source§fn from(s: PermissionStateQuery) -> Self
fn from(s: PermissionStateQuery) -> Self
Source§impl HasParamSpec for PermissionStateQuery
impl HasParamSpec for PermissionStateQuery
type ParamSpec = ParamSpecBoxed
Source§type SetValue = PermissionStateQuery
type SetValue = PermissionStateQuery
type BuilderFn = fn(&str) -> ParamSpecBoxedBuilder<'_, PermissionStateQuery>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for PermissionStateQuery
impl Hash for PermissionStateQuery
Source§impl Ord for PermissionStateQuery
impl Ord for PermissionStateQuery
Source§fn cmp(&self, other: &PermissionStateQuery) -> Ordering
fn cmp(&self, other: &PermissionStateQuery) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PermissionStateQuery
impl PartialEq for PermissionStateQuery
Source§impl PartialOrd for PermissionStateQuery
impl PartialOrd for PermissionStateQuery
Source§impl StaticType for PermissionStateQuery
impl StaticType for PermissionStateQuery
Source§fn static_type() -> Type
fn static_type() -> Type
Self.