ModuleCommunicationHub

Struct ModuleCommunicationHub 

Source
pub struct ModuleCommunicationHub { /* private fields */ }
Expand description

Communication hub for managing inter-module messages

Implementations§

Source§

impl ModuleCommunicationHub

Source

pub fn new() -> Self

Create a new communication hub

Source

pub fn send_message(&mut self, message: InterModuleMessage) -> CoreResult<()>

Send a message from one module to another

Source

pub fn receive_messages(&mut self, module_name: &str) -> Vec<InterModuleMessage>

Receive messages for a specific module

Source

pub fn get_pending_count(&self, module_name: &str) -> usize

Get pending message count for a module

Source

pub fn optimize_routing(&mut self) -> CoreResult<()>

Optimize routing paths between modules

Source

pub fn enable_compression(&mut self) -> CoreResult<()>

Enable message compression for large payloads

Source

pub fn add_route(&mut self, source: String, destination: String)

Add a routing entry

Source

pub fn remove_route(&mut self, source: &str, destination: &str)

Remove a routing entry

Source

pub fn get_routes(&self, source: &str) -> Vec<String>

Get routing destinations for a source module

Source

pub fn broadcast_message( &mut self, message: InterModuleMessage, ) -> CoreResult<()>

Broadcast a message to all connected modules

Source

pub fn get_statistics(&self) -> &CommunicationStatistics

Get communication statistics

Source

pub fn reset_statistics(&mut self)

Reset communication statistics

Source

pub fn update_latency(&mut self, latency: Duration)

Update message latency statistics

Source

pub fn update_error_rate(&mut self, error_occurred: bool)

Update error rate statistics

Source

pub fn clear_queues(&mut self)

Clear all message queues

Source

pub fn clear_module_queue(&mut self, module_name: &str)

Clear queue for a specific module

Source

pub fn get_memory_usage(&self) -> usize

Get total memory usage of all queues

Source

pub fn cleanup_expired_messages(&mut self, max_age: Duration)

Cleanup expired messages (messages older than specified duration)

Source

pub fn get_health_status(&self) -> CommunicationHealth

Get health status of the communication hub

Source

pub fn create_optimized_pipeline( &self, input: &AdvancedInput, config: &CrossModuleOptimizationConfig, ) -> CoreResult<OptimizedPipeline>

Create an optimized processing pipeline

Trait Implementations§

Source§

impl Debug for ModuleCommunicationHub

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ModuleCommunicationHub

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V