Struct kaspa_core::core::Core
source · pub struct Core {
pub keep_running: AtomicBool,
/* private fields */
}Fields§
§keep_running: AtomicBoolImplementations§
source§impl Core
impl Core
pub fn new() -> Core
pub fn bind<T>(&self, service: Arc<T>)where
T: Service,
pub fn find(&self, ident: &'static str) -> Option<Arc<dyn Service>>
sourcepub fn run(self: &Arc<Core>)
pub fn run(self: &Arc<Core>)
Starts all services and blocks waiting to join them. For performing other operations in between use start and join explicitly
sourcepub fn start(self: &Arc<Core>) -> Vec<JoinHandle<()>>
pub fn start(self: &Arc<Core>) -> Vec<JoinHandle<()>>
Start all services and return std::thread join handles
sourcepub fn join(&self, workers: Vec<JoinHandle<()>>)
pub fn join(&self, workers: Vec<JoinHandle<()>>)
Join workers previously returned from start
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Core
impl Send for Core
impl Sync for Core
impl Unpin for Core
impl UnwindSafe for Core
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
source§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Returns a immutable reference to
Any, which is backed by the type implementing this trait.source§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Returns a mutable reference to
Any, which is backed by the type implementing this trait.