pub struct GenBackgroundService<A> {
pub threads: Option<usize>,
/* private fields */
}
Expand description
A generic type of background service
Fields§
§threads: Option<usize>
The number of threads. Default is 1
Implementations§
Trait Implementations§
Source§impl<A> Service for GenBackgroundService<A>
impl<A> Service for GenBackgroundService<A>
Source§fn start_service<'life0, 'async_trait>(
&'life0 mut self,
_fds: Option<ListenFds>,
shutdown: ShutdownWatch,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_service<'life0, 'async_trait>(
&'life0 mut self,
_fds: Option<ListenFds>,
shutdown: ShutdownWatch,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
This function will be called when the server is ready to start the service. Read more
Auto Trait Implementations§
impl<A> Freeze for GenBackgroundService<A>
impl<A> RefUnwindSafe for GenBackgroundService<A>where
A: RefUnwindSafe,
impl<A> Send for GenBackgroundService<A>
impl<A> Sync for GenBackgroundService<A>
impl<A> Unpin for GenBackgroundService<A>
impl<A> UnwindSafe for GenBackgroundService<A>where
A: RefUnwindSafe,
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