Skip to main content

SchemaRecvTracker

Struct SchemaRecvTracker 

Source
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

Source

pub fn new() -> Self

Source

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).

Source

pub fn get_remote_args_root(&self, method_id: MethodId) -> Option<TypeRef>

Look up the remote’s root TypeRef for a method’s args.

Source

pub fn get_remote_response_root(&self, method_id: MethodId) -> Option<TypeRef>

Look up the remote’s root TypeRef for a method’s response.

Source

pub fn get_received(&self, type_id: &SchemaHash) -> Option<Schema>

Look up a received schema by type ID.

Source

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

Source§

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

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

impl Default for SchemaRecvTracker

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl SchemaSource for SchemaRecvTracker

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> 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, 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> ChannelLiveness for T
where T: MaybeSend + MaybeSync + 'static,

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSync for T
where T: Sync,