pub enum MiniAppPermission {
Show 17 variants
Microphone,
Camera,
Geolocation,
ClipboardRead,
ClipboardWrite,
Fullscreen,
Autoplay,
DisplayCapture,
Midi,
PictureInPicture,
ScreenWakeLock,
SpeakerSelection,
Accelerometer,
Gyroscope,
Magnetometer,
AmbientLightSensor,
Bluetooth,
}Expand description
Available permissions that Mini Apps can request
Variants§
Microphone
Access to microphone for voice chat, recording, etc.
Camera
Access to camera for video calls, photos, etc.
Geolocation
Access to device location
ClipboardRead
Read from clipboard
ClipboardWrite
Write to clipboard
Fullscreen
Allow fullscreen mode
Autoplay
Allow media autoplay
DisplayCapture
Screen capture via getDisplayMedia()
Midi
Web MIDI API for musical instruments
PictureInPicture
Picture-in-Picture video mode
ScreenWakeLock
Prevent screen from sleeping
SpeakerSelection
Select audio output device
Accelerometer
Device acceleration sensor
Gyroscope
Device orientation/rotation sensor
Magnetometer
Compass/magnetic field sensor
AmbientLightSensor
Ambient light level sensor
Bluetooth
Web Bluetooth API
Implementations§
Source§impl MiniAppPermission
impl MiniAppPermission
Sourcepub fn all() -> Vec<MiniAppPermission>
pub fn all() -> Vec<MiniAppPermission>
Get all available permissions
Sourcepub fn policy_name(&self) -> &'static str
pub fn policy_name(&self) -> &'static str
Get the Permissions-Policy directive name for this permission
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Get a description of what this permission allows
Trait Implementations§
Source§impl Clone for MiniAppPermission
impl Clone for MiniAppPermission
impl Copy for MiniAppPermission
Source§impl Debug for MiniAppPermission
impl Debug for MiniAppPermission
Source§impl<'de> Deserialize<'de> for MiniAppPermission
impl<'de> Deserialize<'de> for MiniAppPermission
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
Source§impl Display for MiniAppPermission
impl Display for MiniAppPermission
impl Eq for MiniAppPermission
Source§impl From<MiniAppPermission> for PermissionInfo
impl From<MiniAppPermission> for PermissionInfo
Source§fn from(perm: MiniAppPermission) -> Self
fn from(perm: MiniAppPermission) -> Self
Converts to this type from the input type.
Source§impl FromStr for MiniAppPermission
impl FromStr for MiniAppPermission
Source§impl Hash for MiniAppPermission
impl Hash for MiniAppPermission
Source§impl PartialEq for MiniAppPermission
impl PartialEq for MiniAppPermission
Source§impl Serialize for MiniAppPermission
impl Serialize for MiniAppPermission
impl StructuralPartialEq for MiniAppPermission
Auto Trait Implementations§
impl Freeze for MiniAppPermission
impl RefUnwindSafe for MiniAppPermission
impl Send for MiniAppPermission
impl Sync for MiniAppPermission
impl Unpin for MiniAppPermission
impl UnsafeUnpin for MiniAppPermission
impl UnwindSafe for MiniAppPermission
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.