pub struct SchemaSendTracker { /* private fields */ }Expand description
Tracks which schemas have been sent on the current connection.
Plain struct — owned by SessionCore behind the same Mutex as the
conduit tx. Reset on reconnection.
Implementations§
Source§impl SchemaSendTracker
impl SchemaSendTracker
pub fn new() -> Self
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reset connection-scoped state — call on reconnection. The registry is preserved (schemas don’t change across connections).
Sourcepub fn registry(&self) -> &SchemaRegistry
pub fn registry(&self) -> &SchemaRegistry
Borrow the schema registry. Used by the operation store to pull schemas it hasn’t stored yet.
Sourcepub fn attach_schemas_for_shape_if_needed(
&mut self,
method_id: MethodId,
shape: &'static Shape,
schematic: &mut impl Schematic,
) -> Result<CborPayload, SchemaExtractError>
pub fn attach_schemas_for_shape_if_needed( &mut self, method_id: MethodId, shape: &'static Shape, schematic: &mut impl Schematic, ) -> Result<CborPayload, SchemaExtractError>
Prepare schemas for a method call/response, returning a CBOR payload to inline in the request/response. Returns empty payload if schemas were already sent for this shape.
Sourcepub fn prepare_send(
&mut self,
method_id: MethodId,
direction: BindingDirection,
root_type: &TypeRef,
source: &dyn SchemaSource,
) -> CborPayload
pub fn prepare_send( &mut self, method_id: MethodId, direction: BindingDirection, root_type: &TypeRef, source: &dyn SchemaSource, ) -> CborPayload
Prepare schemas for sending, sourcing them from a SchemaSource.
Used for replay paths where we don’t have a live value shape but do
have the bound root TypeRef and a schema source.
Sourcepub fn extract_schemas(
&mut self,
shape: &'static Shape,
) -> Result<ExtractedSchemas, SchemaExtractError>
pub fn extract_schemas( &mut self, shape: &'static Shape, ) -> Result<ExtractedSchemas, SchemaExtractError>
Compatibility shim: schema extraction is now independent from connection-scoped send tracking.