def header.classify
mylsm-lsm-store@0.6.0.1 · src/coordinator/Protocol.bend:566
import mylsm-lsm-store@0.6.0.1/src/coordinator/Protocol.bend as Protocol
import Base
566def header.classify(
567 decision: FrameDecision,
568 frame_bytes: Maybe<&2, U32>
569) -> HeaderDecision:
570 match decision:
571 case NeedMore{}:
572 match frame_bytes:
573 case Some{length}: HeaderReady{length}
574 case _: HeaderMalformed{}
575 case Decoded{_}:
576 match frame_bytes:
577 case Some{length}: HeaderReady{length}
578 case _: HeaderMalformed{}
579 case Malformed{}: HeaderMalformed{}
580 case UnknownOperation{}: HeaderUnknownOperation{}
581 case FrameTooLarge{}: HeaderTooLarge{}