message_observer
Generated Rust API reference for byte_engine.
byte_engine / core / message_observer
Module message_observer
Passive diagnostics for publications and factory-created objects.
Attach one MessageObserver through
crate::core::message_bus::MessageBus::observe. Publication ranges come
from the bus's existing route counters, so producers do no extra work.
Ranges preserve sequence within one route, not ordering between routes.
Factory hooks retain handles and Rust type names, never message payloads or
created values.
Quick Reference
| Item | Kind | Description |
|---|---|---|
MessageObservation | struct | The MessageObservation struct identifies a contiguous range of successful publications without retaining payloads. |
MessageObservationBatch | struct | The MessageObservationBatch struct carries one lossless snapshot of publication ranges since the prior drain. |
ObservedEntity | struct | The ObservedEntity struct describes one factory handle and every representation created for it. |
MessageObserver | struct | The MessageObserver struct provides passive publication ranges and a factory-backed entity catalog. |
MessageObservationError | enum | The MessageObservationError enum explains why passive observation could not start. |
Structs
MessageObservation
struct MessageObservation {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/core/message_observer.rs:52-56
The MessageObservation struct identifies a contiguous range of successful publications without retaining payloads.
Implementations
-
fn topic_id(self) -> usizeReturns the stable bus-local route identifier used by topic diagnostics.
-
fn first_sequence(self) -> u64Returns the first zero-based publication sequence in this range.
-
fn count(self) -> u64Returns the number of consecutive publications in this range.
Trait Implementations
impl ArchivePointee for MessageObservation
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for MessageObservation
impl Clone for MessageObservation
-
fn clone(&self) -> MessageObservationRelated:
MessageObservation
impl Copy for MessageObservation
impl Debug for MessageObservation
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for MessageObservation
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for MessageObservation
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for MessageObservation
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for MessageObservation
impl<K> Equivalent for MessageObservation
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for MessageObservation
impl LayoutRaw for MessageObservation
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for MessageObservation
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for MessageObservation
-
fn eq(&self, other: &MessageObservation) -> boolRelated:
MessageObservation
impl Pointable for MessageObservation
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for MessageObservation
-
type Metadata = ()
impl Read for MessageObservation
impl StructuralPartialEq for MessageObservation
impl WithSubscriber for MessageObservation
MessageObservationBatch
struct MessageObservationBatch {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/core/message_observer.rs:77-79
The MessageObservationBatch struct carries one lossless snapshot of publication ranges since the prior drain.
Implementations
-
fn messages(&self) -> &[MessageObservation]Related:
MessageObservationReturns one range for each route that published since the prior drain.
Trait Implementations
impl ArchivePointee for MessageObservationBatch
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for MessageObservationBatch
impl Debug for MessageObservationBatch
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for MessageObservationBatch
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for MessageObservationBatch
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for MessageObservationBatch
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for MessageObservationBatch
impl<K> Equivalent for MessageObservationBatch
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for MessageObservationBatch
impl LayoutRaw for MessageObservationBatch
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for MessageObservationBatch
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for MessageObservationBatch
-
fn eq(&self, other: &MessageObservationBatch) -> boolRelated:
MessageObservationBatch
impl Pointable for MessageObservationBatch
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for MessageObservationBatch
-
type Metadata = ()
impl Read for MessageObservationBatch
impl StructuralPartialEq for MessageObservationBatch
impl WithSubscriber for MessageObservationBatch
ObservedEntity
struct ObservedEntity {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/core/message_observer.rs:90-93
The ObservedEntity struct describes one factory handle and every representation created for it.
Implementations
-
fn handle(&self) -> HandleReturns the stable identity shared by the entity's representations.
-
fn types(&self) -> &[&'static str]Returns the Rust type names in their first-published order.
Trait Implementations
impl ArchivePointee for ObservedEntity
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ObservedEntity
impl Clone for ObservedEntity
-
fn clone(&self) -> ObservedEntityRelated:
ObservedEntity
impl Debug for ObservedEntity
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for ObservedEntity
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for ObservedEntity
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for ObservedEntity
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for ObservedEntity
impl<K> Equivalent for ObservedEntity
-
fn equivalent(&self, key: &K) -> bool
impl Instrument for ObservedEntity
impl LayoutRaw for ObservedEntity
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ObservedEntity
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for ObservedEntity
-
fn eq(&self, other: &ObservedEntity) -> boolRelated:
ObservedEntity
impl Pointable for ObservedEntity
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for ObservedEntity
-
type Metadata = ()
impl Read for ObservedEntity
impl StructuralPartialEq for ObservedEntity
impl WithSubscriber for ObservedEntity
MessageObserver
struct MessageObserver {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/core/message_observer.rs:113-115
The MessageObserver struct provides passive publication ranges and a factory-backed entity catalog.
Drain publication ranges through Self::drain_messages. Query current
factory handles through Self::entities. Neither path retains message
payloads or factory-created values.
Implementations
-
fn drain_messages(&self, topics: &[TopicSnapshot]) -> MessageObservationBatchRelated:
TopicSnapshot,MessageObservationBatchReturns lossless publication ranges since the prior call for these topic snapshots.
-
fn entities(&self) -> Vec<ObservedEntity>Related:
ObservedEntityReturns a handle-sorted snapshot of every current factory-created entity.
Trait Implementations
impl ArchivePointee for MessageObserver
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for MessageObserver
impl Clone for MessageObserver
-
fn clone(&self) -> MessageObserverRelated:
MessageObserver
impl Downcast for MessageObserver
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for MessageObserver
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for MessageObserver
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Instrument for MessageObserver
impl LayoutRaw for MessageObserver
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for MessageObserver
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointable for MessageObserver
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for MessageObserver
-
type Metadata = ()
impl Read for MessageObserver
impl WithSubscriber for MessageObserver
Enums
MessageObservationError
enum MessageObservationError {
AlreadyAttached,
RoutesAlreadyRegistered,
}Defined in crates/byte-engine/src/core/message_observer.rs:26-31
The MessageObservationError enum explains why passive observation could not start.
Variants
-
AlreadyAttachedThis bus already has its one passive observer.
-
RoutesAlreadyRegisteredAt least one typed route was registered before observation started.
Trait Implementations
impl ArchivePointee for MessageObservationError
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for MessageObservationError
impl Clone for MessageObservationError
-
fn clone(&self) -> MessageObservationErrorRelated:
MessageObservationError
impl Copy for MessageObservationError
impl Debug for MessageObservationError
-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl Display for MessageObservationError
-
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result
impl Downcast for MessageObservationError
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSend for MessageObservationError
-
fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>
impl DowncastSync for MessageObservationError
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
impl Eq for MessageObservationError
impl<K> Equivalent for MessageObservationError
-
fn equivalent(&self, key: &K) -> bool
impl Error for MessageObservationError
impl Instrument for MessageObservationError
impl LayoutRaw for MessageObservationError
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for MessageObservationError
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl PartialEq for MessageObservationError
-
fn eq(&self, other: &MessageObservationError) -> boolRelated:
MessageObservationError
impl Pointable for MessageObservationError
-
const ALIGN: usize -
type Init = T -
unsafe fn init(init: <T as Pointable>::Init) -> usize -
unsafe fn deref<'a>(ptr: usize) -> &'a T -
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T -
unsafe fn drop(ptr: usize)
impl Pointee for MessageObservationError
-
type Metadata = ()
impl Read for MessageObservationError
impl StructuralPartialEq for MessageObservationError
impl ToString for MessageObservationError
-
fn to_string(&self) -> String