mist/internal/http2/frame

Types

pub type ConnectionError {
  NoError
  ProtocolError
  InternalError
  FlowControlError
  SettingsTimeout
  StreamClosed
  FrameSizeError
  RefusedStream
  Cancel
  CompressionError
  ConnectError
  EnhanceYourCalm
  InadequateSecurity
  Http11Required
  Unsupported(Int)
}

Constructors

  • NoError
  • ProtocolError
  • InternalError
  • FlowControlError
  • SettingsTimeout
  • StreamClosed
  • FrameSizeError
  • RefusedStream
  • Cancel
  • CompressionError
  • ConnectError
  • EnhanceYourCalm
  • InadequateSecurity
  • Http11Required
  • Unsupported(Int)
pub type Data {
  Complete(BitArray)
  Continued(BitArray)
}

Constructors

  • Complete(BitArray)
  • Continued(BitArray)
pub type Frame {
  Data(
    data: BitArray,
    end_stream: Bool,
    identifier: StreamIdentifier(Frame),
  )
  Header(
    data: Data,
    end_stream: Bool,
    identifier: StreamIdentifier(Frame),
    priority: option.Option(HeaderPriority),
  )
  Priority(
    exclusive: Bool,
    identifier: StreamIdentifier(Frame),
    stream_dependency: StreamIdentifier(Frame),
    weight: Int,
  )
  Termination(
    error: ConnectionError,
    identifier: StreamIdentifier(Frame),
  )
  Settings(ack: Bool, settings: List(Setting))
  PushPromise(
    data: Data,
    identifier: StreamIdentifier(Frame),
    promised_stream_id: StreamIdentifier(Frame),
  )
  Ping(ack: Bool, data: BitArray)
  GoAway(
    data: BitArray,
    error: ConnectionError,
    last_stream_id: StreamIdentifier(Frame),
  )
  WindowUpdate(amount: Int, identifier: StreamIdentifier(Frame))
  Continuation(data: Data, identifier: StreamIdentifier(Frame))
  Unknown(frame_type: Int)
}

Constructors

pub type HeaderPriority {
  HeaderPriority(
    exclusive: Bool,
    stream_dependency: StreamIdentifier(Frame),
    weight: Int,
  )
}

Constructors

pub type PushState {
  Enabled
  Disabled
}

Constructors

  • Enabled
  • Disabled
pub type Setting {
  HeaderTableSize(Int)
  ServerPush(PushState)
  MaxConcurrentStreams(Int)
  InitialWindowSize(Int)
  MaxFrameSize(Int)
  MaxHeaderListSize(Int)
}

Constructors

  • HeaderTableSize(Int)
  • ServerPush(PushState)
  • MaxConcurrentStreams(Int)
  • InitialWindowSize(Int)
  • MaxFrameSize(Int)
  • MaxHeaderListSize(Int)
pub opaque type StreamIdentifier(phantom)

Values

pub fn decode(
  frame: BitArray,
) -> Result(#(Frame, BitArray), ConnectionError)
pub fn encode(frame: Frame) -> BitArray
pub fn get_stream_identifier(
  identifier: StreamIdentifier(phantom),
) -> Int
pub fn settings_ack() -> Frame
pub fn stream_identifier(value: Int) -> StreamIdentifier(Frame)
✨ Search Document