Skip to main content

DynamicImplementation

Trait DynamicImplementation 

Source
pub trait DynamicImplementation: Send + Sync {
    // Required methods
    fn primary_interface(&self) -> &str;
    fn invoke(&self, request: &mut ServerRequest) -> Result<(), SystemException>;

    // Provided method
    fn is_a(&self, repository_id: &str) -> bool { ... }
}
Expand description

PortableServer::DynamicImplementation: a servant that handles every operation itself, from a ServerRequest. Wrap it in DynamicServant to activate it.

Required Methods§

Source

fn primary_interface(&self) -> &str

_primary_interface: the repository id of the most derived interface the servant implements, the type id of its references.

Source

fn invoke(&self, request: &mut ServerRequest) -> Result<(), SystemException>

Runs request: calls ServerRequest::arguments once with the types and modes of the parameters, and then set_result or set_exception, or returns a system exception. An unknown operation is BAD_OPERATION with minor UNKNOWN_OPERATION.

Provided Methods§

Source

fn is_a(&self, repository_id: &str) -> bool

Whether the servant implements repository_id; the default only knows the primary interface.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§