Skip to main content

Proxy

Trait Proxy 

Source
pub trait Proxy: Send + Sync {
    type ServiceDef: ServiceDefinition;
    type TransportImpl: Transport;

    // Required method
    fn new(transport: Arc<Self::TransportImpl>, instance_id: InstanceId) -> Self;

    // Provided method
    fn service_id() -> ServiceId { ... }
}
Expand description

Trait that generated proxy structs implement.

Enforces that every proxy knows which service it represents and can be constructed from a transport + instance ID.

Required Associated Types§

Required Methods§

Source

fn new(transport: Arc<Self::TransportImpl>, instance_id: InstanceId) -> Self

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§