pub struct SchemaRecvTracker { /* private fields */ }Expand description
Tracks schemas received from the remote peer on the current connection.
Uses interior mutability (Mutex) so it can be shared via Arc between the
session recv loop and in-flight handler tasks. Created fresh on each
connection — NOT reused across reconnections.
Implementations§
Source§impl SchemaRecvTracker
impl SchemaRecvTracker
pub fn new() -> Self
Sourcepub fn record_received(
&self,
method_id: MethodId,
direction: BindingDirection,
payload: SchemaPayload,
) -> Result<(), DuplicateSchemaError>
pub fn record_received( &self, method_id: MethodId, direction: BindingDirection, payload: SchemaPayload, ) -> Result<(), DuplicateSchemaError>
Record a parsed schema message from the remote peer.
Returns Err if a TypeSchemaId was already received — this is a
protocol error (the send tracker didn’t reset on reconnection).
Sourcepub fn get_remote_args_root(&self, method_id: MethodId) -> Option<TypeRef>
pub fn get_remote_args_root(&self, method_id: MethodId) -> Option<TypeRef>
Look up the remote’s root TypeRef for a method’s args.
Sourcepub fn get_remote_response_root(&self, method_id: MethodId) -> Option<TypeRef>
pub fn get_remote_response_root(&self, method_id: MethodId) -> Option<TypeRef>
Look up the remote’s root TypeRef for a method’s response.
Sourcepub fn get_received(&self, type_id: &SchemaHash) -> Option<Schema>
pub fn get_received(&self, type_id: &SchemaHash) -> Option<Schema>
Look up a received schema by type ID.
Sourcepub fn received_registry(&self) -> SchemaRegistry
pub fn received_registry(&self) -> SchemaRegistry
Get a snapshot of the received schema registry for building translation plans.
Trait Implementations§
Source§impl Debug for SchemaRecvTracker
impl Debug for SchemaRecvTracker
Source§impl Default for SchemaRecvTracker
impl Default for SchemaRecvTracker
Source§impl SchemaSource for SchemaRecvTracker
impl SchemaSource for SchemaRecvTracker
fn get_schema(&self, id: SchemaHash) -> Option<Schema>
Auto Trait Implementations§
impl !Freeze for SchemaRecvTracker
impl RefUnwindSafe for SchemaRecvTracker
impl Send for SchemaRecvTracker
impl Sync for SchemaRecvTracker
impl Unpin for SchemaRecvTracker
impl UnsafeUnpin for SchemaRecvTracker
impl UnwindSafe for SchemaRecvTracker
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