pub struct KernelIpc { /* private fields */ }Expand description
Kernel IPC subsystem wrapping the core MessageBus.
Adds kernel-level message envelope (type, routing, timestamps) on top of the existing broadcast channel infrastructure.
Implementations§
Source§impl KernelIpc
impl KernelIpc
Sourcepub fn new(bus: Arc<MessageBus>) -> Self
pub fn new(bus: Arc<MessageBus>) -> Self
Create a new KernelIpc wrapping the given MessageBus.
Sourcepub fn bus(&self) -> &Arc<MessageBus>
pub fn bus(&self) -> &Arc<MessageBus>
Get a reference to the underlying MessageBus.
Sourcepub fn send_checked(
&self,
msg: &KernelMessage,
checker: &CapabilityChecker,
chain: Option<&ChainManager>,
) -> Result<(), KernelError>
pub fn send_checked( &self, msg: &KernelMessage, checker: &CapabilityChecker, chain: Option<&ChainManager>, ) -> Result<(), KernelError>
Send a kernel message with RBAC enforcement and chain logging.
- If the target is
Process(to_pid), checks IPC capability via theCapabilityChecker. - Logs the send event to the chain (if provided).
- Publishes via the bus.
Sourcepub fn send(&self, msg: &KernelMessage) -> Result<(), KernelError>
pub fn send(&self, msg: &KernelMessage) -> Result<(), KernelError>
Send a kernel message.
Currently serializes the message to JSON and publishes it as an inbound message on the bus. Future versions (K2) will implement PID-based routing and topic subscriptions.
Auto Trait Implementations§
impl Freeze for KernelIpc
impl !RefUnwindSafe for KernelIpc
impl Send for KernelIpc
impl Sync for KernelIpc
impl Unpin for KernelIpc
impl UnsafeUnpin for KernelIpc
impl !UnwindSafe for KernelIpc
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
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>
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