pub struct ServiceContainer {
pub debug_service: DebugService,
pub state_container: Arc<AppStateContainer>,
}
Expand description
Container for shared services that widgets can access This provides dependency injection for widgets
Fields§
§debug_service: DebugService
Debug service for logging and diagnostics
state_container: Arc<AppStateContainer>
Reference to the application state container
Implementations§
Source§impl ServiceContainer
impl ServiceContainer
pub fn new(state_container: Arc<AppStateContainer>) -> Self
Sourcepub fn clone_for_widget(&self) -> Self
pub fn clone_for_widget(&self) -> Self
Clone the service container (for sharing with widgets)
Sourcepub fn enable_debug(&self)
pub fn enable_debug(&self)
Enable debug mode
Sourcepub fn disable_debug(&self)
pub fn disable_debug(&self)
Disable debug mode
Sourcepub fn toggle_debug(&self)
pub fn toggle_debug(&self)
Toggle debug mode
Sourcepub fn generate_debug_dump(&self) -> String
pub fn generate_debug_dump(&self) -> String
Generate a comprehensive debug dump
Auto Trait Implementations§
impl Freeze for ServiceContainer
impl !RefUnwindSafe for ServiceContainer
impl !Send for ServiceContainer
impl !Sync for ServiceContainer
impl Unpin for ServiceContainer
impl !UnwindSafe for ServiceContainer
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