pub trait Service:
Send
+ Sync
+ 'static {
// Provided methods
fn name(&self) -> &'static str { ... }
fn init(
&self,
_ctx: &Arc<Context>,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>> { ... }
fn check(&self) -> bool { ... }
}Provided Methods§
fn name(&self) -> &'static str
fn init( &self, _ctx: &Arc<Context>, ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn Disposable>>, CordisError>> + Send + '_>>
Sourcefn check(&self) -> bool
fn check(&self) -> bool
Availability predicate for this service instance.
The kernel consumes check() at every point where a freshly built
instance meets the graph:
crate::RegistryService::register— after the plugin factory produces the service and BEFORE it is provided; afalseverdict rests the fiber as inspectableFailed { error: "availability predicate rejected service" }instead ofActive. Registration is non-throwing: register-before-ready is a supported transient that later refreshes converge.crate::Context::plugin— afterinit; afalseverdict leaves the provided value in place but rests the fiber asInactive(the historical behavior).
It is NOT consulted on untyped store reads (Context::get): the store
holds type-erased values, so per-read checks would need downcasting
machinery that no consumer has asked for. Services whose availability
can change AFTER registration (circuit breakers, feature gates) must
drive their dependents by re-providing / notifying instead of relying
on spontaneous re-checks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Service for ActiveRuns
impl Service for ActiveRuns
Source§impl Service for AresConfigManager
impl Service for AresConfigManager
Source§impl Service for AresVectorStore
impl Service for AresVectorStore
Source§impl Service for AuthService
impl Service for AuthService
Source§impl Service for CalculatorService
impl Service for CalculatorService
Source§impl Service for ConfigBasedLLMFactory
impl Service for ConfigBasedLLMFactory
Source§impl Service for ContextProviderHandle
impl Service for ContextProviderHandle
Source§impl Service for DeployRegistry
impl Service for DeployRegistry
Source§impl Service for DynamicConfigManager
impl Service for DynamicConfigManager
Source§impl Service for EmergencyStop
impl Service for EmergencyStop
impl Service for ExternalContext
Source§impl Service for FleetSecrets
impl Service for FleetSecrets
Source§impl Service for LoopRegistry
impl Service for LoopRegistry
Source§impl Service for McpRegistry
impl Service for McpRegistry
Source§impl Service for McpService
impl Service for McpService
impl Service for ModelOverride
Source§impl Service for PipelineService
impl Service for PipelineService
Source§impl Service for PostgresClient
impl Service for PostgresClient
Source§impl Service for PostgresService
impl Service for PostgresService
Source§impl Service for ProviderRegistry
impl Service for ProviderRegistry
Source§impl Service for SchedulerService
impl Service for SchedulerService
Source§impl Service for SkillEngine
impl Service for SkillEngine
Source§impl Service for SkillsService
impl Service for SkillsService
impl Service for TenantModelPolicy
Source§impl Service for TriggerService
Available on crate feature postgres only.
impl Service for TriggerService
Available on crate feature
postgres only.Source§impl Service for UsageContext
impl Service for UsageContext
Source§impl Service for WorkflowEngine
impl Service for WorkflowEngine
Implementors§
impl Service for AgentRegistry
impl Service for CurrentEntries
impl Service for EntryConfigFillerHandle
impl Service for EntryIntercept
impl Service for EventsService
impl Service for Execute
impl Service for Llm
impl Service for Loader
impl Service for LoaderJournal
impl Service for LoaderOps
impl Service for LoggerIntercept
impl Service for LoggerService
impl Service for ModuleGraph
impl Service for PluginRegistry
impl Service for ReflectService
impl Service for RegistryService
impl Service for RhaiService
Available on crate feature
rhai only.