httpx/sig/transcoder/chunker.rbs
2022-01-16 22:54:56 +02:00

50 lines
874 B
Plaintext

module HTTPX::Transcoder
module Chunker
CRLF: String
class Error < HTTPX::Error
end
def self?.encode: (_Each[String] chunks) -> Encoder
class Encoder
@raw: _Each[String]
def each: () { (String) -> void } -> void
| () -> Enumerator[String, void]
private
def initialize: (_Each[String] chunks) -> void
end
class Decoder
extend Forwardable
include _ToS
@buffer: String
@chunk_length: Integer
@chunk_buffer: String
@finished: bool
@state: Symbol
@trailers: bool
def each: () { (String) -> void } -> void
def finished?: () -> bool
def empty?: () -> bool
def <<: (string) -> void
def clear: () -> void
private
def initialize: (String, ?bool) -> void
def nextstate: (Symbol) -> void
end
end
end