Safe Haskell | None |
---|---|
Language | Haskell2010 |
Capnproto message canonicalization, per:
Documentation
canonicalize :: (RWCtx m s, Message m msgIn) => Struct msgIn -> m (MutMsg s, Segment (MutMsg s)) Source #
Return a canonicalized message with a copy of the given struct as its root. returns a (message, segment) pair, where the segment is the first and only segment of the returned message.
In addition to the usual reasons for failure when reading a message (traversal limit, malformed messages), this can fail if the message does not fit in a single segment, as the canonical form requires single-segment messages.