pub struct AppLifecycleManager { /* private fields */ }Expand description
App lifecycle manager for mobile ML applications
Implementations§
Source§impl AppLifecycleManager
impl AppLifecycleManager
Sourcepub fn new(config: LifecycleConfig) -> Result<Self>
pub fn new(config: LifecycleConfig) -> Result<Self>
Create new lifecycle manager with configuration
Sourcepub fn initialize(&mut self) -> Result<()>
pub fn initialize(&mut self) -> Result<()>
Initialize lifecycle manager
Sourcepub fn handle_state_transition(
&mut self,
new_state: AppState,
reason: TransitionReason,
) -> Result<()>
pub fn handle_state_transition( &mut self, new_state: AppState, reason: TransitionReason, ) -> Result<()>
Handle app state transition
Sourcepub fn schedule_background_task(&mut self, task: BackgroundTask) -> Result<()>
pub fn schedule_background_task(&mut self, task: BackgroundTask) -> Result<()>
Schedule background task
Sourcepub fn execute_background_tasks(&mut self) -> Result<Vec<TaskResult>>
pub fn execute_background_tasks(&mut self) -> Result<Vec<TaskResult>>
Execute background tasks
Sourcepub fn handle_memory_pressure(
&mut self,
pressure_level: MemoryPressureLevel,
) -> Result<()>
pub fn handle_memory_pressure( &mut self, pressure_level: MemoryPressureLevel, ) -> Result<()>
Handle memory pressure warning
Sourcepub fn handle_thermal_warning(
&mut self,
thermal_level: ThermalLevel,
) -> Result<()>
pub fn handle_thermal_warning( &mut self, thermal_level: ThermalLevel, ) -> Result<()>
Handle thermal warning
Sourcepub fn get_system_status(&self) -> SystemStatus
pub fn get_system_status(&self) -> SystemStatus
Get current system status
Sourcepub fn get_statistics(&self) -> &LifecycleStats
pub fn get_statistics(&self) -> &LifecycleStats
Get lifecycle statistics
Sourcepub fn generate_stats_report(&self) -> StatsSummaryReport
pub fn generate_stats_report(&self) -> StatsSummaryReport
Generate statistics report
Auto Trait Implementations§
impl Freeze for AppLifecycleManager
impl !RefUnwindSafe for AppLifecycleManager
impl Send for AppLifecycleManager
impl Sync for AppLifecycleManager
impl Unpin for AppLifecycleManager
impl UnsafeUnpin for AppLifecycleManager
impl !UnwindSafe for AppLifecycleManager
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> 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 more