pub struct PermissionReport {
pub os: PlatformOs,
pub entries: [PermissionEntry; 3],
}Expand description
Zero-heap-allocation permission report with entries ordered as
[Microphone, SystemAudio, ScreenRecording].
Fields§
§os: PlatformOs§entries: [PermissionEntry; 3]Implementations§
Source§impl PermissionReport
impl PermissionReport
pub const fn new( os: PlatformOs, microphone: PermissionEntry, system_audio: PermissionEntry, screen_recording: PermissionEntry, ) -> PermissionReport
pub const fn entries(&self) -> &[PermissionEntry; 3]
pub const fn microphone(&self) -> PermissionEntry
pub const fn system_audio(&self) -> PermissionEntry
pub const fn screen_recording(&self) -> PermissionEntry
pub const fn entry(&self, kind: PermissionKind) -> PermissionEntry
pub const fn state_for(&self, kind: PermissionKind) -> PermissionState
Sourcepub fn is_granted(&self) -> bool
pub fn is_granted(&self) -> bool
Returns true iff every entry marked required == true is explicitly PermissionState::Granted.
Sourcepub fn has_denial(&self) -> bool
pub fn has_denial(&self) -> bool
Returns true if any required == true entry is Denied or Restricted.
Sourcepub fn requires_relaunch(&self) -> bool
pub fn requires_relaunch(&self) -> bool
Returns true if any required == true entry requires restarting the application for consent to take effect.
pub fn required_kinds(&self) -> Vec<PermissionKind>
Trait Implementations§
Source§impl Clone for PermissionReport
impl Clone for PermissionReport
Source§fn clone(&self) -> PermissionReport
fn clone(&self) -> PermissionReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PermissionReport
Source§impl Debug for PermissionReport
impl Debug for PermissionReport
impl Eq for PermissionReport
Source§impl PartialEq for PermissionReport
impl PartialEq for PermissionReport
impl StructuralPartialEq for PermissionReport
Auto Trait Implementations§
impl Freeze for PermissionReport
impl RefUnwindSafe for PermissionReport
impl Send for PermissionReport
impl Sync for PermissionReport
impl Unpin for PermissionReport
impl UnsafeUnpin for PermissionReport
impl UnwindSafe for PermissionReport
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