Trait script::dom::permissions::PermissionAlgorithm
source · pub trait PermissionAlgorithm {
type Descriptor;
type Status;
// Required methods
fn create_descriptor(
cx: JSContext,
permission_descriptor_obj: *mut JSObject,
) -> Result<Self::Descriptor, Error>;
fn permission_query(
cx: JSContext,
promise: &Rc<Promise>,
descriptor: &Self::Descriptor,
status: &Self::Status,
);
fn permission_request(
cx: JSContext,
promise: &Rc<Promise>,
descriptor: &Self::Descriptor,
status: &Self::Status,
);
fn permission_revoke(
descriptor: &Self::Descriptor,
status: &Self::Status,
can_gc: CanGc,
);
}
Required Associated Types§
type Descriptor
type Status
Required Methods§
fn create_descriptor( cx: JSContext, permission_descriptor_obj: *mut JSObject, ) -> Result<Self::Descriptor, Error>
fn permission_query( cx: JSContext, promise: &Rc<Promise>, descriptor: &Self::Descriptor, status: &Self::Status, )
fn permission_request( cx: JSContext, promise: &Rc<Promise>, descriptor: &Self::Descriptor, status: &Self::Status, )
fn permission_revoke( descriptor: &Self::Descriptor, status: &Self::Status, can_gc: CanGc, )
Object Safety§
This trait is not object safe.