pub struct DaemonRegistry { /* private fields */ }Expand description
Typed startup registry injected by the binary crate.
This registry is the source of truth for startup hook values for the current
daemon run/reload iteration. It deliberately does not copy config-derived
facts; Config remains the source of truth for which subsystems are enabled.
Implementations§
Source§impl DaemonRegistry
impl DaemonRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
Create an empty registry. Missing starters are treated as unwired
optional subsystems by daemon::run.
pub fn register_gateway( &mut self, starter: Box<dyn Fn(String, u16, Config, Option<Sender<Value>>, Option<Sender<bool>>, Option<Arc<TuiRegistry>>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync>, ) -> &mut Self
pub fn register_channels( &mut self, starter: Box<dyn Fn(Config, CancellationToken) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync>, ) -> &mut Self
pub fn register_socket( &mut self, starter: Box<dyn Fn(Arc<RpcContext>, CancellationToken, Arc<AtomicUsize>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync>, ) -> &mut Self
pub fn register_wss( &mut self, starter: Box<dyn Fn(Arc<RpcContext>, CancellationToken, Arc<AtomicUsize>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync>, ) -> &mut Self
pub fn register_mqtt( &mut self, starter: Box<dyn Fn(MqttConfig) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send + Sync>, ) -> &mut Self
Trait Implementations§
Source§impl Default for DaemonRegistry
impl Default for DaemonRegistry
Source§fn default() -> DaemonRegistry
fn default() -> DaemonRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DaemonRegistry
impl !RefUnwindSafe for DaemonRegistry
impl Send for DaemonRegistry
impl Sync for DaemonRegistry
impl Unpin for DaemonRegistry
impl UnsafeUnpin for DaemonRegistry
impl !UnwindSafe for DaemonRegistry
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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