#[non_exhaustive]pub struct BlockMeta {
pub provider_call_id: Option<String>,
pub source: Option<String>,
pub wire: Option<WireMeta>,
}Expand description
Envelope provenance. Fields are serde-additive so older records without them still deserialize.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.provider_call_id: Option<String>Provider-issued identifier (e.g. upstream call id).
source: Option<String>Origin tag (e.g. “user”, “provider:gpt-4o”, “host”). Optional.
wire: Option<WireMeta>What the provider’s item carried beyond the facts in this block. Written by the model door, read only by the protocol renderer whose format matches; the kernel never interprets it.
Implementations§
Source§impl BlockMeta
impl BlockMeta
Sourcepub fn from_source(source: impl Into<String>) -> Self
pub fn from_source(source: impl Into<String>) -> Self
Metadata naming only where the block came from, such as "user".
Sourcepub fn with_provider_call_id(self, provider_call_id: impl Into<String>) -> Self
pub fn with_provider_call_id(self, provider_call_id: impl Into<String>) -> Self
Sets the provider-issued call identifier.
Sourcepub fn with_source(self, source: impl Into<String>) -> Self
pub fn with_source(self, source: impl Into<String>) -> Self
Sets the origin tag.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BlockMeta
impl<'de> Deserialize<'de> for BlockMeta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BlockMeta
impl StructuralPartialEq for BlockMeta
Auto Trait Implementations§
impl Freeze for BlockMeta
impl RefUnwindSafe for BlockMeta
impl Send for BlockMeta
impl Sync for BlockMeta
impl Unpin for BlockMeta
impl UnsafeUnpin for BlockMeta
impl UnwindSafe for BlockMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more