Skip to main content

RecordMetadata

Struct RecordMetadata 

Source
pub struct RecordMetadata {
Show 13 fields pub record_id: u32, pub record_key: String, pub name: String, pub type_id: String, pub origin: RecordOrigin, pub buffer_type: String, pub buffer_capacity: Option<usize>, pub producer_count: usize, pub consumer_count: usize, pub writable: bool, pub outbound_connector_count: usize, pub schema_type: Option<String>, pub entity: Option<String>,
}
Expand description

Metadata about a registered record type

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

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

§Liveness is an observability extra

A record.list reply enumerates records the server registered, not records that have carried a value — a server registering a fixed pool up front lists the whole pool. Only produced_count distinguishes them, and it is observability-gated by design (liveness derives from buffer counters, which constrained targets compile away). So a server whose clients need that distinction must be built with observability on; without it the honest client answer is “unknown”.

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

§origin: RecordOrigin

How the record gets its values (Source, Link, Transform, Passive)

§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

§outbound_connector_count: usize

Number of outbound connector links registered

§schema_type: Option<String>

Data-contract schema name (e.g. "temperature"), when the serving dispatch owns a schema registry that can resolve it (the WebSocket connector’s StreamableRegistry). Core alone cannot map a TypeId to a contract name and leaves it None.

§entity: Option<String>

The record key’s leaf segment — everything after the last . or / ("vienna" for "temp.vienna" or "sensors/temp/vienna").

Only an entity identifier where the leaf is the node. Under a deeper scheme it is not: "station.17.temperature" yields "temperature", not the "17" a caller wants — such clients must parse the key themselves.

Implementations§

Source§

impl RecordMetadata

Source

pub fn new<K: RecordKey>( record_id: RecordId, record_key: K, type_id: TypeId, name: String, origin: RecordOrigin, buffer_type: String, buffer_capacity: Option<usize>, producer_count: usize, consumer_count: usize, writable: bool, 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
  • origin - How the record gets its values (Source, Link, Transform, Passive)
  • 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
  • outbound_connector_count - Number of outbound connectors

Trait Implementations§

Source§

impl Clone for RecordMetadata

Source§

fn clone(&self) -> RecordMetadata

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> RemoteSerialize for T

Source§

fn to_json(&self) -> Option<Value>

Serialize this value to a JSON value, or None on failure.
Source§

fn from_json(value: &Value) -> Option<T>

Deserialize a JSON value into Self, or None on schema mismatch.
Source§

fn to_json_vec(&self) -> Option<Vec<u8>>

Serialize this value to owned JSON bytes. Read more
Source§

fn from_json_slice(bytes: &[u8]) -> Option<T>

Deserialize one complete JSON value from bytes. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.