Trait Backend

Source
pub trait Backend
where Self: Actor + Handler<Set> + Handler<Get> + Handler<Lock> + Handler<Delete>,
{ type Actor: Actor<Context = <Self as Backend>::Context> + Handler<Set> + Handler<Get> + Handler<Lock> + Handler<Delete>; type Context: ActorContext + ToEnvelope<Self::Actor, Get> + ToEnvelope<Self::Actor, Set> + ToEnvelope<Self::Actor, Lock> + ToEnvelope<Self::Actor, Delete>; }
Expand description

Define the behavior needed of an cache layer to work with cache backend.

Ultimately the implementing type must be an Actix Actor and it must implement handlers for a specific set of message types:

Required Associated Types§

Source

type Actor: Actor<Context = <Self as Backend>::Context> + Handler<Set> + Handler<Get> + Handler<Lock> + Handler<Delete>

Type of backend actor bound.

Source

type Context: ActorContext + ToEnvelope<Self::Actor, Get> + ToEnvelope<Self::Actor, Set> + ToEnvelope<Self::Actor, Lock> + ToEnvelope<Self::Actor, Delete>

Type for backend Actor context.

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§