Struct CommunicationManager

pub struct CommunicationManager { /* private fields */ }
Expand description

Communication management component implementation

Implementations§

§

impl CommunicationManager

pub fn new() -> CommunicationManager

Create a new communication manager with default configuration

pub fn with_config(config: CommunicationConfig) -> CommunicationManager

Create a new communication manager with custom configuration

pub fn performance() -> CommunicationManager

Create a performance-optimized communication manager

pub fn concurrent() -> CommunicationManager

Create a concurrency-optimized communication manager

pub fn pattern_heavy() -> CommunicationManager

Create a pattern-heavy communication manager

pub fn cache_optimized() -> CommunicationManager

Create a cache-optimized communication manager

pub fn memory_efficient() -> CommunicationManager

Create a memory-efficient communication manager

pub fn atomic() -> CommunicationManager

Create an atomic lock-free communication manager for nanosecond performance

pub fn create_message_router( &self, ) -> Result<Box<dyn MessageRouter>, NerveError>

Create a message router based on configuration

pub fn create_circuit_breaker( &self, _failure_threshold: u32, _timeout: Duration, ) -> Result<Box<dyn Any>, NerveError>

Create a circuit breaker - placeholder for now

pub fn config(&self) -> &CommunicationConfig

Get the current configuration

pub fn update_config( &mut self, config: CommunicationConfig, ) -> Result<(), NerveError>

Update the configuration

Trait Implementations§

§

impl CommunicationComponent for CommunicationManager

§

fn create_router(&self) -> Result<Box<dyn MessageRouter>, NerveError>

Create a message router
§

fn create_publisher(&self) -> Result<Box<dyn Publisher>, NerveError>

Create a publisher
§

fn create_subscriber(&self) -> Result<Box<dyn Subscriber>, NerveError>

Create a subscriber
§

fn create_subscription_manager( &self, ) -> Result<Box<dyn SubscriptionManager>, NerveError>

Create a subscription manager
§

fn create_request_response( &self, ) -> Result<Box<dyn RequestResponse>, NerveError>

Create a request-response handler
§

fn message_throughput(&self) -> f64

Get message throughput (messages per second)
§

fn error_rate(&self) -> f64

Get error rate percentage
§

impl Debug for CommunicationManager

§

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

Formats the value using the given formatter. Read more
§

impl NerveComponent for CommunicationManager

§

fn id(&self) -> &ComponentId

Get component identifier
§

fn component_type(&self) -> ComponentType

Get component type
§

fn is_healthy(&self) -> bool

Check if component is healthy
§

fn get_statistics(&self) -> SystemStatistics

Get component statistics
§

fn reset_statistics(&mut self)

Reset component statistics
§

fn shutdown(&mut self) -> Result<(), NerveError>

Shutdown the component

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.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

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.