[−][src]Trait dendrite::axon_utils::HandlerRegistry
Describes a registry for handlers for a particular type projection (or context) and a particular return type.
Required methods
pub 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<()>
pub 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<()>
pub 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<()>
pub 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<()>
pub 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]
pub 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<()>
pub 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<()>
pub 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<()>
pub 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<()>