pub struct PlatformCapabilities {
pub supports_dnd_read: bool,
pub media_pause_granular: bool,
pub installer_unsigned_warning: bool,
pub video_pause_reliable: bool,
}Expand description
Behavioural capability flags the renderer branches on, so each platform-gated feature is decided once here rather than re-derived from the raw platform string in every component.
Fields§
§supports_dnd_read: boolWhether the OS exposes a Do-Not-Disturb / Focus state the app can read (macOS, Windows, GNOME/KDE on Linux).
media_pause_granular: boolWhether media pause during breaks can target individual players precisely (Linux via MPRIS) rather than firing a best-effort play/pause media key (macOS, Windows).
installer_unsigned_warning: boolWhether the installer is unsigned and the OS will show a reputation warning (Windows SmartScreen) on update.
video_pause_reliable: boolWhether fullscreen-video detection (the “pause during fullscreen
video” setting) is reliable on this host. True on macOS, Windows
and X11 Linux, where the app enumerates on-screen windows to
confirm a real fullscreen window. False on Linux Wayland, where
no portable window enumeration exists and detection degrades to
an assertion-only signal that fires on any media keeping the
display awake — see video.rs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlatformCapabilities
impl RefUnwindSafe for PlatformCapabilities
impl Send for PlatformCapabilities
impl Sync for PlatformCapabilities
impl Unpin for PlatformCapabilities
impl UnsafeUnpin for PlatformCapabilities
impl UnwindSafe for PlatformCapabilities
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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 more