pub struct PlatformServiceHub { /* private fields */ }Expand description
Unified per-app hub coordinating permissions, protocols, Dynamic Island / Live Activities, haptics, tray, and A11y announcements.
Implementations§
Source§impl PlatformServiceHub
Platform-aware Dynamic Island, permissions, haptics, tray, sharing, and A11y dispatch for PlatformServiceHub.
impl PlatformServiceHub
Platform-aware Dynamic Island, permissions, haptics, tray, sharing, and A11y dispatch for PlatformServiceHub.
Sourcepub const fn default_island_mode(
platform: PlatformKind,
) -> IslandPresentationMode
pub const fn default_island_mode( platform: PlatformKind, ) -> IslandPresentationMode
Sourcepub fn start_live_activity(
&mut self,
activity_id: String,
content: LiveActivityContent,
) -> LiveActivityHandle
pub fn start_live_activity( &mut self, activity_id: String, content: LiveActivityContent, ) -> LiveActivityHandle
Starts a Dynamic Island / Live Activity session on iOS/iPadOS or a graceful fallback on other platforms.
§Arguments
&Self- Mutable service hub.String- Unique activity identifier.LiveActivityContent- Declarative compact, minimal, and expanded content payload.
§Returns
LiveActivityHandle- Handle describing the active live activity and resolved presentation mode.
Sourcepub fn update_live_activity(
&mut self,
activity_id: &str,
content: LiveActivityContent,
) -> bool
pub fn update_live_activity( &mut self, activity_id: &str, content: LiveActivityContent, ) -> bool
Sourcepub fn end_live_activity(&mut self, activity_id: &str) -> bool
pub fn end_live_activity(&mut self, activity_id: &str) -> bool
Sourcepub fn trigger_haptic(&mut self, style: HapticStyle) -> bool
pub fn trigger_haptic(&mut self, style: HapticStyle) -> bool
Sourcepub fn biometric_kind(&self) -> BiometricKind
pub fn biometric_kind(&self) -> BiometricKind
Sourcepub fn configure_tray(
&mut self,
config: SystemTrayConfig,
) -> Result<(), PlatformError>
pub fn configure_tray( &mut self, config: SystemTrayConfig, ) -> Result<(), PlatformError>
Sourcepub fn tray_config(&self) -> Option<&SystemTrayConfig>
pub fn tray_config(&self) -> Option<&SystemTrayConfig>
Sourcepub fn send_notification(&mut self, notification: SystemNotification)
pub fn send_notification(&mut self, notification: SystemNotification)
Dispatches a native OS notification and records it in telemetry.
§Arguments
&Self- Mutable service hub.SystemNotification- Notification payload.
Sourcepub fn announce_a11y(&mut self, message: String, politeness: A11yLiveRegion)
pub fn announce_a11y(&mut self, message: String, politeness: A11yLiveRegion)
Queues a screen reader accessibility live announcement.
§Arguments
&Self- Mutable service hub.String- Message text to announce.A11yLiveRegion- Politeness priority.
Source§impl PlatformServiceHub
impl PlatformServiceHub
pub fn get_platform(&self) -> PlatformKind
pub fn get_mut_platform(&mut self) -> &mut PlatformKind
pub fn set_platform(&mut self, val: PlatformKind) -> &mut Self
pub fn get_permissions(&self) -> &PermissionManager
pub fn get_mut_permissions(&mut self) -> &mut PermissionManager
pub fn set_permissions(&mut self, val: PermissionManager) -> &mut Self
pub fn get_protocols(&self) -> &ProtocolRegistry
pub fn get_mut_protocols(&mut self) -> &mut ProtocolRegistry
pub fn set_protocols(&mut self, val: ProtocolRegistry) -> &mut Self
pub fn get_live_activities(&self) -> &Vec<LiveActivityHandle>
pub fn get_mut_live_activities(&mut self) -> &mut Vec<LiveActivityHandle>
pub fn set_live_activities(&mut self, val: Vec<LiveActivityHandle>) -> &mut Self
pub fn get_notifications(&self) -> &Vec<SystemNotification>
pub fn get_mut_notifications(&mut self) -> &mut Vec<SystemNotification>
pub fn set_notifications(&mut self, val: Vec<SystemNotification>) -> &mut Self
pub fn get_announcements(&self) -> &Vec<A11yAnnouncement>
pub fn get_mut_announcements(&mut self) -> &mut Vec<A11yAnnouncement>
pub fn set_announcements(&mut self, val: Vec<A11yAnnouncement>) -> &mut Self
pub fn get_mut_tray(&mut self) -> &mut Option<SystemTrayConfig>
pub fn set_tray(&mut self, val: Option<SystemTrayConfig>) -> &mut Self
pub fn get_haptic_count(&self) -> u64
pub fn get_mut_haptic_count(&mut self) -> &mut u64
pub fn set_haptic_count(&mut self, val: u64) -> &mut Self
Source§impl PlatformServiceHub
impl PlatformServiceHub
pub fn new(platform: PlatformKind) -> Self
Trait Implementations§
Source§impl Clone for PlatformServiceHub
impl Clone for PlatformServiceHub
Source§impl Debug for PlatformServiceHub
impl Debug for PlatformServiceHub
Auto Trait Implementations§
impl Forget for PlatformServiceHub
impl Freeze for PlatformServiceHubwhere
*const u8 is !null: Freeze,
PhantomData<(SystemPermission, PermissionStatus)>: Freeze,
PhantomData<(SystemPermission, String)>: Freeze,
PhantomData<ProtocolRegistration>: Freeze,
PhantomData<DeepLinkEvent>: Freeze,
PhantomData<LiveActivityHandle>: Freeze,
PhantomData<SystemNotification>: Freeze,
PhantomData<A11yAnnouncement>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
impl Move for PlatformServiceHub
impl RefUnwindSafe for PlatformServiceHub
impl Send for PlatformServiceHubwhere
RawTable<(SystemPermission, PermissionStatus)>: Send,
RawTable<(SystemPermission, String)>: Send,
RawVecInner: Send,
RawTable<(String, String)>: Send,
impl Sync for PlatformServiceHubwhere
RawTable<(SystemPermission, PermissionStatus)>: Sync,
RawTable<(SystemPermission, String)>: Sync,
RawVecInner: Sync,
RawTable<(String, String)>: Sync,
impl Unpin for PlatformServiceHub
impl UnsafeUnpin for PlatformServiceHubwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(SystemPermission, PermissionStatus)>: UnsafeUnpin,
PhantomData<(SystemPermission, String)>: UnsafeUnpin,
PhantomData<ProtocolRegistration>: UnsafeUnpin,
PhantomData<DeepLinkEvent>: UnsafeUnpin,
PhantomData<LiveActivityHandle>: UnsafeUnpin,
PhantomData<SystemNotification>: UnsafeUnpin,
PhantomData<A11yAnnouncement>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for PlatformServiceHubwhere
HashMap<SystemPermission, PermissionStatus>: UnwindSafe,
HashMap<SystemPermission, String>: UnwindSafe,
RawVecInner: UnwindSafe,
HashMap<String, String>: UnwindSafe,
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