sig/resolver/native.rbs in httpx-0.17.0 vs sig/resolver/native.rbs in httpx-0.18.0
- old
+ new
@@ -3,12 +3,10 @@
class Native
extend Forwardable
include ResolverMixin
include _ToIO
- type state = :idle | :open | :closed
-
DEFAULTS: Hash[Symbol, untyped]
DNS_PORT: Integer
@options: Options
@ns_index: Integer
@@ -19,12 +17,13 @@
@_record_types: Hash[String, Hash["A" | "AAAA", dns_resource]]
@connections: Array[Connection]
@queries: Hash[String, Connection]
@read_buffer: String
@write_buffer: Buffer
- @state: state
+ attr_reader state: Symbol
+
def closed?: () -> bool
def empty?: () -> bool
def close: () -> void
@@ -56,10 +55,10 @@
def resolve: (?Connection connection, ?String hostname) -> void
def build_socket: () -> void
- def transition: (state nextstate) -> void
+ def transition: (Symbol nextstate) -> void
def handle_error: (NativeResolveError | StandardError) -> void
end
end
end
\ No newline at end of file