Skip to main content

IMessageTypeResolver

Trait IMessageTypeResolver 

Source
pub trait IMessageTypeResolver: Send + Sync {
    // Required methods
    fn get_by_guid(&self, id: Guid) -> Result<&'static ClassType, Error>;
    fn get_guid(&self, ty: &'static ClassType) -> Result<Guid, Error>;
}
Expand description

Maps the identifier a message carries on the wire to its class and back. An identifier or a class the resolver does not know is a KeyNotFoundException in the original and Error::KeyNotFound here.

Required Methods§

Source

fn get_by_guid(&self, id: Guid) -> Result<&'static ClassType, Error>

Source

fn get_guid(&self, ty: &'static ClassType) -> Result<Guid, Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§