Safe Haskell | None |
---|---|
Language | Haskell2010 |
Capnproto message canonicalization, per:
Synopsis
- canonicalize :: (RWCtx m s, MonadReadMessage mutIn m) => Struct mutIn -> m (Message ('Mut s), Segment ('Mut s))
Documentation
canonicalize :: (RWCtx m s, MonadReadMessage mutIn m) => Struct mutIn -> m (Message ('Mut s), Segment ('Mut 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.