Skip to main content

IdentityFactory

Trait IdentityFactory 

Source
pub trait IdentityFactory:
    Send
    + Sync
    + 'static {
    // Required method
    fn reconstruct(
        &self,
        actor_json: &str,
    ) -> Result<Box<dyn Actor>, IdentityError>;
}
Expand description

Re-export identity port traits and JSON stubs from photon_core. Reconstruct handler identity from captured actor JSON (handler boundary only).

Required Methods§

Source

fn reconstruct(&self, actor_json: &str) -> Result<Box<dyn Actor>, IdentityError>

Build an actor for #[photon::subscribe] dispatch.

§Errors

Returns an error if the operation fails.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§