| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Network.ONCRPC.XDR.Serial
Description
XDR Serialization
Synopsis
- class XDR a where
- class (XDR a, Enum a) => XDREnum a where
- xdrFromEnum :: a -> Int
- xdrToEnum :: MonadFail m => Int -> m a
- xdrToEnum' :: XDREnum a => Int -> a
- xdrPutEnum :: XDREnum a => a -> Put
- xdrGetEnum :: XDREnum a => Get a
- class (XDR a, XDREnum (XDRDiscriminant a)) => XDRUnion a where
- type XDRDiscriminant a :: *
- xdrSplitUnion :: a -> (Int, Put)
- xdrGetUnionArm :: Int -> Get a
- xdrDiscriminant :: XDRUnion a => a -> XDRDiscriminant a
- xdrPutUnion :: XDRUnion a => a -> Put
- xdrGetUnion :: XDRUnion a => Get a
- xdrSerialize :: XDR a => a -> ByteString
- xdrSerializeLazy :: XDR a => a -> ByteString
- xdrDeserialize :: XDR a => ByteString -> Either String a
- xdrDeserializeLazy :: XDR a => ByteString -> Either String a
Documentation
An XDR type that can be (de)serialized.
Instances
class (XDR a, Enum a) => XDREnum a where Source #
An XDR type defined with "enum".
Note that the XDREnum Int value is not (necessarily) the same as the Enum Int value.
The Enum instance is derived automatically to allow succ, etc. to work usefully in Haskell, whereas the XDREnum reflects the XDR-defined values.
Instances
| XDREnum Accept_stat Source # | |
Defined in Network.ONCRPC.Prot Methods xdrFromEnum :: Accept_stat -> Int Source # | |
| XDREnum Auth_flavor Source # | |
Defined in Network.ONCRPC.Prot Methods xdrFromEnum :: Auth_flavor -> Int Source # | |
| XDREnum Auth_stat Source # | |
| XDREnum Msg_type Source # | |
| XDREnum Reject_stat Source # | |
Defined in Network.ONCRPC.Prot Methods xdrFromEnum :: Reject_stat -> Int Source # | |
| XDREnum Reply_stat Source # | |
Defined in Network.ONCRPC.Prot Methods xdrFromEnum :: Reply_stat -> Int Source # | |
| XDREnum Int Source # | |
| XDREnum UnsignedInt Source # | |
Defined in Network.ONCRPC.XDR.Serial Methods xdrFromEnum :: UnsignedInt -> Int Source # | |
| XDREnum Bool Source # | |
xdrToEnum' :: XDREnum a => Int -> a Source #
class (XDR a, XDREnum (XDRDiscriminant a)) => XDRUnion a where Source #
An XDR type defined with "union"
Associated Types
type XDRDiscriminant a :: * Source #
Methods
xdrSplitUnion :: a -> (Int, Put) Source #
Split a union into its discriminant and body generator.
xdrGetUnionArm :: Int -> Get a Source #
Get the body of a union based on its discriminant.
Instances
| XDRUnion Accepted_reply_data Source # | |
Defined in Network.ONCRPC.Prot Associated Types Methods xdrSplitUnion :: Accepted_reply_data -> (Int, Put) Source # | |
| XDRUnion Rejected_reply Source # | |
Defined in Network.ONCRPC.Prot Associated Types Methods xdrSplitUnion :: Rejected_reply -> (Int, Put) Source # xdrGetUnionArm :: Int -> Get Rejected_reply Source # | |
| XDRUnion Reply_body Source # | |
Defined in Network.ONCRPC.Prot Associated Types type XDRDiscriminant Reply_body Source # Methods xdrSplitUnion :: Reply_body -> (Int, Put) Source # xdrGetUnionArm :: Int -> Get Reply_body Source # | |
| XDRUnion Rpc_msg_body Source # | |
Defined in Network.ONCRPC.Prot Associated Types Methods xdrSplitUnion :: Rpc_msg_body -> (Int, Put) Source # xdrGetUnionArm :: Int -> Get Rpc_msg_body Source # | |
| XDR a => XDRUnion (Optional a) Source # | |
Defined in Network.ONCRPC.XDR.Serial Associated Types type XDRDiscriminant (Optional a) Source # | |
xdrDiscriminant :: XDRUnion a => a -> XDRDiscriminant a Source #
xdrSerialize :: XDR a => a -> ByteString Source #
xdrSerializeLazy :: XDR a => a -> ByteString Source #
xdrDeserialize :: XDR a => ByteString -> Either String a Source #
"S.runGet' xdrGetxdrDeserializeLazy :: XDR a => ByteString -> Either String a Source #
"S.runGetLazy' xdrGet