RecordMetadata

Struct RecordMetadata 

Source
pub struct RecordMetadata {
    pub record_id: u32,
    pub record_key: String,
    pub name: String,
    pub type_id: String,
    pub buffer_type: String,
    pub buffer_capacity: Option<usize>,
    pub producer_count: usize,
    pub consumer_count: usize,
    pub writable: bool,
    pub created_at: String,
    pub last_update: Option<String>,
    pub outbound_connector_count: usize,
}
Expand description

Metadata about a registered record type

Provides information for remote introspection, including buffer configuration, producer/consumer counts, and timestamps.

When the metrics feature is enabled, additional fields are included for buffer-level statistics (produced_count, consumed_count, etc.).

Fields§

§record_id: u32

Unique record identifier (index in the storage)

§record_key: String

Unique record key (stable identifier for lookup)

§name: String

Record type name (Rust type name)

§type_id: String

TypeId as hexadecimal string

§buffer_type: String

Buffer type: “spmc_ring”, “single_latest”, “mailbox”, or “none”

§buffer_capacity: Option<usize>

Buffer capacity (None for unbounded or no buffer)

§producer_count: usize

Number of registered producer services

§consumer_count: usize

Number of registered consumer services

§writable: bool

Whether write operations are permitted for this record

§created_at: String

When the record was registered (ISO 8601)

§last_update: Option<String>

Last update timestamp (ISO 8601), None if never updated

§outbound_connector_count: usize

Number of outbound connector links registered

Implementations§

Source§

impl RecordMetadata

Source

pub fn new<K: RecordKey>( record_id: RecordId, record_key: K, type_id: TypeId, name: String, buffer_type: String, buffer_capacity: Option<usize>, producer_count: usize, consumer_count: usize, writable: bool, created_at: String, outbound_connector_count: usize, ) -> Self

Creates a new record metadata entry

§Arguments
  • record_id - The RecordId index
  • record_key - The unique record key
  • type_id - The TypeId of the record
  • name - The Rust type name
  • buffer_type - Buffer type string
  • buffer_capacity - Optional buffer capacity
  • producer_count - Number of producers
  • consumer_count - Number of consumers
  • writable - Whether writes are permitted
  • created_at - Creation timestamp (ISO 8601)
  • outbound_connector_count - Number of outbound connectors
Source

pub fn with_last_update(self, timestamp: String) -> Self

Sets the last update timestamp

Source

pub fn with_last_update_opt(self, timestamp: Option<String>) -> Self

Sets the last update timestamp from an Option

Trait Implementations§

Source§

impl Clone for RecordMetadata

Source§

fn clone(&self) -> RecordMetadata

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecordMetadata

Source§

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

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

impl<'de> Deserialize<'de> for RecordMetadata

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for RecordMetadata

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,