JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Giterated stack changeover, refactor still incomplete

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨8d40dfe

⁨giterated-stack/src/state.rs⁩ - ⁨506⁩ bytes
Raw
1 /// A type which can be passed into a stateful handler.
2 ///
3 /// # Trait Bounds
4 /// This trait is bound on `Send + Sync`, as well as `Clone`. Handler states are
5 /// cloned many times, and should be inexpensive to clone.
6 ///
7 /// # Blanket Impl
8 /// This trait is blanket-impl'd on any type that meets the requirements. You do not need
9 /// to manually mark your state types with it.
10 pub trait HandlerState: Send + Sync + Clone + 'static {}
11
12 impl<T> HandlerState for T where T: Send + Sync + Clone + 'static {}
13