LeftOverState

    LeftOverState represents any left-over inbound, outbound, and pending outbound events that hit the EmbeddedChannel and were not consumed when finish was called on the EmbeddedChannel.

    Embedded.swift:517
    enum LeftOverState

    EmbeddedChannel is most useful in testing and usually in unit tests, you want to consume all inbound and outbound data to verify they are what you expect. Therefore, when you finish an EmbeddedChannel it will return if it’s either .clean (no left overs) or that it has .leftOvers.

    Cases

    Other members in extension

    View members

    Hide members

    This section is hidden by default because it contains too many (29) members.

    Types

    • enum BufferState

      BufferState represents the state of either the inbound, or the outbound EmbeddedChannel buffer. These buffers contain data that travelled the ChannelPipeline all the way.

    • struct SynchronousOptions
    • struct WrongTypeError

      WrongTypeError is throws if you use readInbound or readOutbound and request a certain type but the first item in the respective buffer is of a different type.

    Type members

    Instance members

    Show implementation details (1)

    Hide implementation details

    Citizens in NIOEmbedded

    Instance members

    • var hasLeftOvers: Bool

      true if the EmbeddedChannel if there was unconsumed inbound, outbound, or pending outbound data left on the Channel when it was finished.

    • var isClean: Bool

      true if the EmbeddedChannel was clean on finish, ie. there is no unconsumed inbound, outbound, or pending outbound data left on the Channel.