| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Web.Hyperbole.View.ViewId
Documentation
A unique identifier for a HyperView
data Message = Message1 | Message2
deriving (Generic, ViewId)
Minimal complete definition
Nothing
Associated Types
Most hyperviews are stateless, but you can track internal state by setting this to something other than ()
type ViewState a = ()
Methods
toViewId :: a -> Encoded Source #
parseViewId :: Encoded -> Either String a Source #
default parseViewId :: (Generic a, GFromEncoded (Rep a)) => Encoded -> Either String a Source #
Instances
| ViewId DocumentHead Source # | |||||
Defined in Web.Hyperbole.Document Associated Types
Methods toViewId :: DocumentHead -> Encoded Source # parseViewId :: Encoded -> Either String DocumentHead Source # | |||||
| ViewId Metadata Source # | |||||
| ViewId () Source # | |||||
Defined in Web.Hyperbole.View.ViewId Associated Types
| |||||
| ViewId id => ViewId (FormFields id) Source # | |||||
Defined in Web.Hyperbole.HyperView.Forms Associated Types
Methods toViewId :: FormFields id -> Encoded Source # parseViewId :: Encoded -> Either String (FormFields id) Source # | |||||
| ViewId (Root views) Source # | |||||
| (ViewId a, ToJSON a, FromJSON a) => ViewId (ChildView a) Source # | |||||
| (ViewId id, FromJSON id) => ViewId (Input id a) Source # | |||||
| (ToJSON id, ToJSON opt, FromJSON id, FromJSON opt) => ViewId (Option id opt) Source # | |||||