pub struct Module {
pub manifest: ModuleManifest,
pub binding: Arc<dyn ModuleBinding>,
pub source: ModuleSource,
pub load_status: ModuleLoadStatus,
pub linked_http: Option<LinkedHttpContribution>,
pub runtime_config: &'static [RuntimeConfigDescriptor],
pub runtime_config_groups: &'static [RuntimeConfigGroupDescriptor],
pub admin_data: Option<Arc<dyn AdminDataSource>>,
pub admin_actions: Option<Arc<dyn AdminActionSource>>,
pub admin_queries: Option<Arc<dyn AdminQuerySource>>,
}Expand description
One loaded module. manifest is serializable data; binding is behavior;
runtime_config is internal &'static config NOT in the manifest (the
registry needs the real RuntimeConfigType enum to validate). Cross-source
config wire form is deferred to a later spec.
Fields§
§manifest: ModuleManifest§binding: Arc<dyn ModuleBinding>§source: ModuleSource§load_status: ModuleLoadStatus§linked_http: Option<LinkedHttpContribution>§runtime_config: &'static [RuntimeConfigDescriptor]§runtime_config_groups: &'static [RuntimeConfigGroupDescriptor]§admin_data: Option<Arc<dyn AdminDataSource>>Optional schema-admin data source. None for modules without an admin
surface (e.g. notifications). Set via Module::with_admin_data.
admin_actions: Option<Arc<dyn AdminActionSource>>Optional executable admin actions. Set via Module::with_admin_actions.
admin_queries: Option<Arc<dyn AdminQuerySource>>Optional read-only declarative queries. Set via Module::with_admin_queries.
Implementations§
Source§impl Module
impl Module
Sourcepub fn linked(manifest: ModuleManifest, binding: LinkedBinding) -> Self
pub fn linked(manifest: ModuleManifest, binding: LinkedBinding) -> Self
Build a compile-time (Linked) module from a manifest + linked behavior.
Config defaults to empty; attach it with Module::with_runtime_config.
Sourcepub fn service(
manifest: ModuleManifest,
binding: Arc<dyn ModuleBinding>,
) -> Self
pub fn service( manifest: ModuleManifest, binding: Arc<dyn ModuleBinding>, ) -> Self
Build a Service-delivered Module from a manifest + Provider behavior.
Sourcepub fn with_runtime_config(
self,
runtime_config: &'static [RuntimeConfigDescriptor],
) -> Self
pub fn with_runtime_config( self, runtime_config: &'static [RuntimeConfigDescriptor], ) -> Self
Attach the module’s editable configuration descriptors.
Sourcepub fn with_runtime_config_groups(
self,
runtime_config_groups: &'static [RuntimeConfigGroupDescriptor],
) -> Self
pub fn with_runtime_config_groups( self, runtime_config_groups: &'static [RuntimeConfigGroupDescriptor], ) -> Self
Attach presentation groups for the module’s editable configuration.
Sourcepub fn with_admin_data(self, data: Arc<dyn AdminDataSource>) -> Self
pub fn with_admin_data(self, data: Arc<dyn AdminDataSource>) -> Self
Attach a schema-admin data source (read access to admin entities).
Sourcepub fn with_admin_actions(self, actions: Arc<dyn AdminActionSource>) -> Self
pub fn with_admin_actions(self, actions: Arc<dyn AdminActionSource>) -> Self
Attach admin action behavior for manifest-declared actions.
Sourcepub fn with_admin_queries(self, queries: Arc<dyn AdminQuerySource>) -> Self
pub fn with_admin_queries(self, queries: Arc<dyn AdminQuerySource>) -> Self
Attach declarative query behavior for manifest-declared queries.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Module
impl !UnwindSafe for Module
impl Freeze for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request