Trait dendrite::axon_utils::HandlerRegistry [−][src]
Describes a registry for handlers for a particular type projection (or context) and a particular return type.
Required methods
fn register(
&mut self,
applicator: &'static dyn Fn(&mut Self) -> Result<()>
) -> Result<()>
[src]
&mut self,
applicator: &'static dyn Fn(&mut Self) -> Result<()>
) -> Result<()>
fn insert<T: Send + Clone>(
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Sync)
) -> Result<()>
[src]
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Sync)
) -> Result<()>
fn insert_ignoring_output<T: Send + Clone, R: Clone>(
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<R>>> + Send>> + Sync)
) -> Result<()>
[src]
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<R>>> + Send>> + Sync)
) -> Result<()>
fn insert_with_output<T: Send + Clone>(
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<W>>> + Send>> + Sync)
) -> Result<()>
[src]
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<W>>> + Send>> + Sync)
) -> Result<()>
fn insert_with_mapped_output<T: Send + Clone, R: Clone>(
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<R>>> + Send>> + Sync),
type_name: &str,
wrapper: &'static (dyn Fn(&str, &R) -> Result<W> + Sync)
) -> Result<()>
[src]
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<R>>> + Send>> + Sync),
type_name: &str,
wrapper: &'static (dyn Fn(&str, &R) -> Result<W> + Sync)
) -> Result<()>
fn get(&self, name: &str) -> Option<&Box<dyn SubscriptionHandle<P, W>>>
[src]
Implementors
impl<P: Send + Clone, W: Clone + 'static> HandlerRegistry<P, W> for TheHandlerRegistry<P, W>
[src]
fn register(
&mut self,
applicator: &'static dyn Fn(&mut Self) -> Result<()>
) -> Result<()>
[src]
&mut self,
applicator: &'static dyn Fn(&mut Self) -> Result<()>
) -> Result<()>
fn insert<T: Send + Clone>(
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Sync)
) -> Result<()>
[src]
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Sync)
) -> Result<()>
fn insert_ignoring_output<T: Send + Clone, R: Clone>(
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<R>>> + Send>> + Sync)
) -> Result<()>
[src]
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<R>>> + Send>> + Sync)
) -> Result<()>
fn insert_with_output<T: Send + Clone>(
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<W>>> + Send>> + Sync)
) -> Result<()>
[src]
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<W>>> + Send>> + Sync)
) -> Result<()>
fn insert_with_mapped_output<T: Send + Clone, R: Clone>(
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<R>>> + Send>> + Sync),
type_name: &str,
wrapper: &'static (dyn Fn(&str, &R) -> Result<W> + Sync)
) -> Result<()>
[src]
&mut self,
name: &str,
deserializer: &'static (dyn Fn(Bytes) -> Result<T, DecodeError> + Sync),
handler: &'static (dyn Fn(T, P) -> Pin<Box<dyn Future<Output = Result<Option<R>>> + Send>> + Sync),
type_name: &str,
wrapper: &'static (dyn Fn(&str, &R) -> Result<W> + Sync)
) -> Result<()>