From 5ca9c7892d8b4abc8161d73fe501fbcf554288b8 Mon Sep 17 00:00:00 2001 From: Grigory Moroz Date: Tue, 18 Jul 2023 13:07:28 +0200 Subject: [PATCH] Fix thread safety in storage (#5) --- .rubocop.yml | 4 + lib/money/distributed/read_write_lock.rb | 41 + lib/money/distributed/storage.rb | 16 +- money-distributed.gemspec | 1 + sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi | 11636 ++++++++++++- .../language_server-protocol@3.17.0.3.rbi | 14237 ---------------- spec/money/distributed/storage_spec.rb | 41 + spec/spec_helper.rb | 3 +- 8 files changed, 11487 insertions(+), 14492 deletions(-) create mode 100644 lib/money/distributed/read_write_lock.rb delete mode 100644 sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi diff --git a/.rubocop.yml b/.rubocop.yml index 9df849f..f4c8e2f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -35,6 +35,10 @@ Style/HashSyntax: Style/FrozenStringLiteralComment: Enabled: false + +Gemspec/RequiredRubyVersion: + Enabled: false + Naming/BlockForwarding: Enabled: false diff --git a/lib/money/distributed/read_write_lock.rb b/lib/money/distributed/read_write_lock.rb new file mode 100644 index 0000000..560d5cd --- /dev/null +++ b/lib/money/distributed/read_write_lock.rb @@ -0,0 +1,41 @@ +# typed: strict +# frozen_string_literal: true + +class Money + module Distributed + class ReadWriteLock + extend T::Sig + + sig do + params( + lock: Concurrent::ReentrantReadWriteLock, + _: T.proc.returns(T.untyped), + ).returns(T.untyped) + end + def self.read(lock, &_) + lock.acquire_read_lock + begin + yield + ensure + lock.release_read_lock + nil + end + end + + sig do + params( + lock: Concurrent::ReentrantReadWriteLock, + _: T.proc.void, + ).void + end + def self.write(lock, &_) + lock.acquire_write_lock + begin + yield + ensure + lock.release_write_lock + end + end + end + end +end diff --git a/lib/money/distributed/storage.rb b/lib/money/distributed/storage.rb index 7a84697..64cb9c6 100644 --- a/lib/money/distributed/storage.rb +++ b/lib/money/distributed/storage.rb @@ -15,7 +15,7 @@ def initialize(redis, cache_ttl = nil) @cache_ttl = cache_ttl @cache_updated_at = nil - @mutex = Mutex.new + @lock = Concurrent::ReentrantReadWriteLock.new end def add_rate(iso_from, iso_to, rate) @@ -53,8 +53,8 @@ def marshal_dump [iso_from, iso_to].join(INDEX_KEY_SEPARATOR).upcase end - private def cached_rates - @mutex.synchronize do + def cached_rates + Money::Distributed::ReadWriteLock.read(@lock) do retrieve_rates if @cache.empty? || cache_outdated? @cache end @@ -67,20 +67,24 @@ def marshal_dump @cache_updated_at < Time.now - @cache_ttl end - private def clear_cache - @mutex.synchronize do + def clear_cache + Money::Distributed::ReadWriteLock.write(@lock) do @cache.clear end end private def retrieve_rates + updated_cache = {} + @redis.exec do |r| - r.hgetall(REDIS_KEY).each_with_object(@cache) do |(key, val), h| + r.hgetall(REDIS_KEY).each_with_object(updated_cache) do |(key, val), h| next if val.nil? || val == '' h[key] = BigDecimal(val) end end + + @cache = updated_cache @cache_updated_at = Time.now end end diff --git a/money-distributed.gemspec b/money-distributed.gemspec index 702ba62..0f975f3 100644 --- a/money-distributed.gemspec +++ b/money-distributed.gemspec @@ -23,6 +23,7 @@ Gem::Specification.new do |spec| 'README.md', ] + spec.add_dependency 'concurrent-ruby' spec.add_dependency 'connection_pool' spec.add_dependency 'money', '>= 6.6.0' spec.add_dependency 'redis' diff --git a/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi b/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi index bc839ff..6c849d1 100644 --- a/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +++ b/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi @@ -9,361 +9,11408 @@ # source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#1 module Concurrent extend ::Concurrent::Utility::EngineDetector -end + extend ::Concurrent::Utility::NativeExtensionLoader + extend ::Logger::Severity + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#7 -module Concurrent::Collection; end + private -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#10 -Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # @raise [Transaction::AbortError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 + def abort_transaction; end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#10 -class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend - # @return [MriMapBackend] a new instance of MriMapBackend + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#12 - def initialize(options = T.unsafe(nil), &default_proc); end + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 + def atomically; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 - def []=(key, value); end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 + def call_dataflow(method, executor, *inputs, &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#61 - def clear; end + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # @return [Object] the result of all the operations + # @yield The operation to perform once all the dependencies are met + # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 + def dataflow(*inputs, &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#33 - def compute(key); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 + def dataflow!(*inputs, &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#21 - def compute_if_absent(key); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 + def dataflow_with(executor, *inputs, &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#29 - def compute_if_present(key); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 + def dataflow_with!(executor, *inputs, &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#53 - def delete(key); end + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # @raise [Transaction::LeaveError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 + def leave_transaction; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#57 - def delete_pair(key, value); end + # Returns the current time as tracked by the application monotonic clock. + # + # @param unit [Symbol] the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 + def monotonic_time(unit = T.unsafe(nil)); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#49 - def get_and_set(key, value); end + class << self + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # @raise [Transaction::AbortError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 + def abort_transaction; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#37 - def merge_pair(key, value); end + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 + def atomically; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#45 - def replace_if_exists(key, new_value); end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 + def call_dataflow(method, executor, *inputs, &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#41 - def replace_pair(key, old_value, new_value); end + # @return [Logger] Logger with provided level and output. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#37 + def create_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # @deprecated + # @return [Logger] Logger with provided level and output. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#69 + def create_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # @return [Object] the result of all the operations + # @yield The operation to perform once all the dependencies are met + # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 + def dataflow(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 + def dataflow!(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 + def dataflow_with(executor, *inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 + def dataflow_with!(executor, *inputs, &block); end + + # Disables AtExit handlers including pool auto-termination handlers. + # When disabled it will be the application programmer's responsibility + # to ensure that the handlers are shutdown properly prior to application + # exit by calling `AtExit.run` method. + # + # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. + # @note this option should be needed only because of `at_exit` ordering + # issues which may arise when running some of the testing frameworks. + # E.g. Minitest's test-suite runs itself in `at_exit` callback which + # executes after the pools are already terminated. Then auto termination + # needs to be disabled and called manually after test-suite ends. + # @note This method should *never* be called + # from within a gem. It should *only* be used from within the main + # application and even then it should be used only when necessary. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#48 + def disable_at_exit_handlers!; end + + # General access point to global executors. + # + # @param executor_identifier [Symbol, Executor] symbols: + # - :fast - {Concurrent.global_fast_executor} + # - :io - {Concurrent.global_io_executor} + # - :immediate - {Concurrent.global_immediate_executor} + # @return [Executor] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#83 + def executor(executor_identifier); end + + # Global thread pool optimized for short, fast *operations*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#55 + def global_fast_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#66 + def global_immediate_executor; end + + # Global thread pool optimized for long, blocking (IO) *tasks*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#62 + def global_io_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#109 + def global_logger; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#113 + def global_logger=(value); end + + # Global thread pool user for global *timers*. + # + # @return [Concurrent::TimerSet] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#73 + def global_timer_set; end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # @raise [Transaction::LeaveError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 + def leave_transaction; end + + # Returns the current time as tracked by the application monotonic clock. + # + # @param unit [Symbol] the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 + def monotonic_time(unit = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#7 + def mutex_owned_per_thread?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#87 + def new_fast_executor(opts = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#98 + def new_io_executor(opts = T.unsafe(nil)); end + + # Number of physical processor cores on the current system. For performance + # reasons the calculated value will be memoized on the first call. + # + # On Windows the Win32 API will be queried for the `NumberOfCores from + # Win32_Processor`. This will return the total number "of cores for the + # current instance of the processor." On Unix-like operating systems either + # the `hwprefs` or `sysctl` utility will be called in a subshell and the + # returned value will be used. In the rare case where none of these methods + # work or an exception is raised the function will simply return 1. + # + # @return [Integer] number physical processor cores on the current system + # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb + # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx + # @see http://www.unix.com/man-page/osx/1/HWPREFS/ + # @see http://linux.die.net/man/8/sysctl + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#107 + def physical_processor_count; end + + # Number of processors seen by the OS and used for process scheduling. For + # performance reasons the calculated value will be memoized on the first + # call. + # + # When running under JRuby the Java runtime call + # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According + # to the Java documentation this "value may change during a particular + # invocation of the virtual machine... [applications] should therefore + # occasionally poll this property." Subsequently the result will NOT be + # memoized under JRuby. + # + # Otherwise Ruby's Etc.nprocessors will be used. + # + # @return [Integer] number of processors seen by the OS or Java runtime + # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#86 + def processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#68 + def processor_counter; end + + # Use logger created by #create_simple_logger to log concurrent-ruby messages. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#63 + def use_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Use logger created by #create_stdlib_logger to log concurrent-ruby messages. + # + # @deprecated + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#96 + def use_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + end end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#9 -class Concurrent::Collection::NonConcurrentMapBackend - # WARNING: all public methods of the class must operate on the @backend - # directly without calling each other. This is important because of the - # SynchronizedMapBackend which uses a non-reentrant mutex for performance - # reasons. +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#38 +class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object + # @return [AbstractExchanger] a new instance of AbstractExchanger # - # @return [NonConcurrentMapBackend] a new instance of NonConcurrentMapBackend + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#44 + def initialize; end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#15 - def initialize(options = T.unsafe(nil), &default_proc); end + # + # In some edge cases when a `timeout` is given a return value of `nil` may be + # ambiguous. Specifically, if `nil` is a valid value in the exchange it will + # be impossible to tell whether `nil` is the actual return value or if it + # signifies timeout. When `nil` is a valid value in the exchange consider + # using {#exchange!} or {#try_exchange} instead. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Object] the value exchanged by the other thread or `nil` on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#69 + def exchange(value, timeout = T.unsafe(nil)); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 - def [](key); end + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # On timeout a {Concurrent::TimeoutError} exception will be raised. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @raise [Concurrent::TimeoutError] on timeout + # @return [Object] the value exchanged by the other thread + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#80 + def exchange!(value, timeout = T.unsafe(nil)); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#25 - def []=(key, value); end + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # The return value will be a {Concurrent::Maybe} set to `Just` on success or + # `Nothing` on timeout. + # + # @example + # + # exchanger = Concurrent::Exchanger.new + # + # result = exchanger.exchange(:foo, 0.5) + # + # if result.just? + # puts result.value #=> :bar + # else + # puts 'timeout' + # end + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with + # the item exchanged by the other thread as `#value`; on timeout a + # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#109 + def try_exchange(value, timeout = T.unsafe(nil)); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#94 - def clear; end + private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#59 - def compute(key); end + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @raise [NotImplementedError] + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#122 + def do_exchange(value, timeout); end +end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#29 - def compute_if_absent(key); end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#41 +Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#53 - def compute_if_present(key); end +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#10 +class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::Concern::Deprecation - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#81 - def delete(key); end + # Create a new thread pool. + # + # @return [AbstractExecutorService] a new instance of AbstractExecutorService + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#23 + def initialize(opts = T.unsafe(nil), &block); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#85 - def delete_pair(key, value); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#72 + def auto_terminate=(value); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#99 - def each_pair; end + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#67 + def auto_terminate?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#71 - def get_and_set(key, value); end + # Returns the value of attribute fallback_policy. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#18 + def fallback_policy; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#110 - def get_or_default(key, default_value); end + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#42 + def kill; end + + # Returns the value of attribute name. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#20 + def name; end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#77 - def key?(key); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#52 + def running?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#63 - def merge_pair(key, value); end + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#37 + def shutdown; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#46 - def replace_if_exists(key, new_value); end + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#62 + def shutdown?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#37 - def replace_pair(key, old_value, new_value); end + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#57 + def shuttingdown?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#106 - def size; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#32 + def to_s; end - private + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#47 + def wait_for_termination(timeout = T.unsafe(nil)); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#130 - def dupped_backend; end + private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#124 - def initialize_copy(other); end + # Returns an action which executes the `fallback_policy` once the queue + # size reaches `max_queue`. The reason for the indirection of an action + # is so that the work can be deferred outside of synchronization. + # + # @param args [Array] the arguments to the task which is being handled. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#85 + def fallback_action(*args); end # @return [Boolean] # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#134 - def pair?(key, expected_value); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#126 + def ns_auto_terminate?; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#116 - def set_backend(default_proc); end + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#106 + def ns_execute(*args, &task); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#138 - def store_computed_value(key, new_value); end + # Callback method called when the executor has been killed. + # The default behavior is to do nothing. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#122 + def ns_kill_execution; end + + # Callback method called when an orderly shutdown has completed. + # The default behavior is to signal all waiting threads. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#114 + def ns_shutdown_execution; end end -# A thread-safe subclass of Hash. This version locks against the object -# itself for every method call, ensuring only one thread can be reading -# or writing at a time. This includes iteration methods like `#each`, -# which takes the lock repeatedly when reading an item. +# The set of possible fallback policies that may be set at thread pool creation. # -# @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#15 +Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Array) + +# An abstract implementation of local storage, with sub-classes for +# per-thread and per-fiber locals. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#47 -class Concurrent::Hash < ::Hash; end +# Each execution context (EC, thread or fiber) has a lazily initialized array +# of local variable values. Each time a new local variable is created, we +# allocate an "index" for it. +# +# For example, if the allocated index is 1, that means slot #1 in EVERY EC's +# locals array will be used for the value of that variable. +# +# The good thing about using a per-EC structure to hold values, rather than +# a global, is that no synchronization is needed when reading and writing +# those values (since the structure is only ever accessed by a single +# thread). +# +# Of course, when a local variable is GC'd, 1) we need to recover its index +# for use by other new local variables (otherwise the locals arrays could +# get bigger and bigger with time), and 2) we need to null out all the +# references held in the now-unused slots (both to avoid blocking GC of those +# objects, and also to prevent "stale" values from being passed on to a new +# local when the index is reused). +# +# Because we need to null out freed slots, we need to keep references to +# ALL the locals arrays, so we can null out the appropriate slots in all of +# them. This is why we need to use a finalizer to clean up the locals array +# when the EC goes out of scope. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#35 +class Concurrent::AbstractLocals + # @return [AbstractLocals] a new instance of AbstractLocals + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#36 + def initialize; end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#16 -Concurrent::HashImplementation = Hash + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#89 + def fetch(index); end -# `Concurrent::Map` is a hash-like object and should have much better performance -# characteristics, especially under high concurrency, than `Concurrent::Hash`. -# However, `Concurrent::Map `is not strictly semantically equivalent to a ruby `Hash` -# -- for instance, it does not necessarily retain ordering by insertion time as `Hash` -# does. For most uses it should do fine though, and we recommend you consider -# `Concurrent::Map` instead of `Concurrent::Hash` for your concurrency-safe hash needs. + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#71 + def free_index(index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#55 + def next_index(local); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#102 + def set(index, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#43 + def synchronize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#48 + def weak_synchronize; end + + private + + # When the local goes out of scope, clean up that slot across all locals currently assigned. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#112 + def local_finalizer(index); end + + # Returns the locals for the current scope, or nil if none exist. + # + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#128 + def locals; end + + # Returns the locals for the current scope, creating them if necessary. + # + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#133 + def locals!; end + + # When a thread/fiber goes out of scope, remove the array from @all_arrays. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#119 + def thread_fiber_finalizer(array_object_id); end +end + +# `Agent` is inspired by Clojure's [agent](http://clojure.org/agents) +# function. An agent is a shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. `Agent` is (mostly) +# functionally equivalent to Clojure's agent, except where the runtime +# prevents parity. # -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#39 -class Concurrent::Map < ::Concurrent::Collection::MriMapBackend - # Iterates over each key value pair. - # This method is atomic. +# Agents are reactive, not autonomous - there is no imperative message loop +# and no blocking receive. The state of an Agent should be itself immutable +# and the `#value` of an Agent is always immediately available for reading by +# any thread without any messages, i.e. observation does not require +# cooperation or coordination. +# +# Agent action dispatches are made using the various `#send` methods. These +# methods always return immediately. At some point later, in another thread, +# the following will happen: +# +# 1. The given `action` will be applied to the state of the Agent and the +# `args`, if any were supplied. +# 2. The return value of `action` will be passed to the validator lambda, +# if one has been set on the Agent. +# 3. If the validator succeeds or if no validator was given, the return value +# of the given `action` will become the new `#value` of the Agent. See +# `#initialize` for details. +# 4. If any observers were added to the Agent, they will be notified. See +# `#add_observer` for details. +# 5. If during the `action` execution any other dispatches are made (directly +# or indirectly), they will be held until after the `#value` of the Agent +# has been changed. +# +# If any exceptions are thrown by an action function, no nested dispatches +# will occur, and the exception will be cached in the Agent itself. When an +# Agent has errors cached, any subsequent interactions will immediately throw +# an exception, until the agent's errors are cleared. Agent errors can be +# examined with `#error` and the agent restarted with `#restart`. +# +# The actions of all Agents get interleaved amongst threads in a thread pool. +# At any point in time, at most one action for each Agent is being executed. +# Actions dispatched to an agent from another single agent or thread will +# occur in the order they were sent, potentially interleaved with actions +# dispatched to the same agent from other sources. The `#send` method should +# be used for actions that are CPU limited, while the `#send_off` method is +# appropriate for actions that may block on IO. +# +# Unlike in Clojure, `Agent` cannot participate in `Concurrent::TVar` transactions. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an agent with an initial value +# agent = Concurrent::Agent.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# agent.send{|set| next_fibonacci(set) } +# end +# +# # wait for them to complete +# agent.await +# +# # get the current value +# agent.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Agents support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time an action dispatch returns and +# the new value is successfully validated. Observation will *not* occur if the +# action raises an exception, if validation fails, or when a {#restart} occurs. +# +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Agent when the action began +# processing. The `new_value` is the value to which the Agent was set when the +# action completed. Note that `old_value` and `new_value` may be the same. +# This is not an error. It simply means that the action returned the same +# value. +# +# ## Nested Actions +# +# It is possible for an Agent action to post further actions back to itself. +# The nested actions will be enqueued normally then processed *after* the +# outer action completes, in the order they were sent, possibly interleaved +# with action dispatches from other threads. Nested actions never deadlock +# with one another and a failure in a nested action will never affect the +# outer action. +# +# Nested actions can be called using the Agent reference from the enclosing +# scope or by passing the reference in as a "send" argument. Nested actions +# cannot be post using `self` from within the action block/proc/lambda; `self` +# in this context will not reference the Agent. The preferred method for +# dispatching nested actions is to pass the Agent as an argument. This allows +# Ruby to more effectively manage the closing scope. +# +# Prefer this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send(agent) do |value, this| +# this.send {|v| v + 42 } +# 3.14 +# end +# agent.value #=> 45.14 +# ``` +# +# Over this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send do |value| +# agent.send {|v| v + 42 } +# 3.14 +# end +# ``` +# +# +# **NOTE** Never, *under any circumstances*, call any of the "await" methods +# ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action +# block/proc/lambda. The call will block the Agent and will always fail. +# Calling either {#await} or {#wait} (with a timeout of `nil`) will +# hopelessly deadlock the Agent with no possibility of recovery. +# +# @see http://clojure.org/Agents Clojure Agents +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#145 +class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Observable + + # Create a new `Agent` with the given initial value and options. # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each key value pair in the map - # @yieldparam key [Object] - # @yieldparam value [Object] + # The `:validator` option must be `nil` or a side-effect free proc/lambda + # which takes one argument. On any intended value change the validator, if + # provided, will be called. If the new value is invalid the validator should + # return `false` or raise an error. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 - def each; end + # The `:error_handler` option must be `nil` or a proc/lambda which takes two + # arguments. When an action raises an error or validation fails, either by + # returning false or raising an error, the error handler will be called. The + # arguments to the error handler will be a reference to the agent itself and + # the error object which was raised. + # + # The `:error_mode` may be either `:continue` (the default if an error + # handler is given) or `:fail` (the default if error handler nil or not + # given). + # + # If an action being run by the agent throws an error or doesn't pass + # validation the error handler, if present, will be called. After the + # handler executes if the error mode is `:continue` the Agent will continue + # as if neither the action that caused the error nor the error itself ever + # happened. + # + # If the mode is `:fail` the Agent will become {#failed?} and will stop + # accepting new action dispatches. Any previously queued actions will be + # held until {#restart} is called. The {#value} method will still work, + # returning the value of the Agent before the error. + # + # @option opts + # @option opts + # @option opts + # @param initial [Object] the initial value + # @param opts [Hash] the configuration options + # @return [Agent] a new instance of Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#220 + def initialize(initial, opts = T.unsafe(nil)); end - # Iterates over each key. - # This method is atomic. + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Appropriate for actions that may block on IO. + # + # @param action [Proc] the action dispatch to be enqueued + # @return [Concurrent::Agent] self + # @see #send_off + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#331 + def <<(action); end + + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far, from this thread or nested by the Agent, have occurred. Will + # block when {#failed?}. Will never return if a failed Agent is {#restart} + # with `:clear_actions` true. + # + # Returns a reference to `self` to support method chaining: + # + # ``` + # current_value = agent.await.value + # ``` + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @return [Boolean] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#350 + def await; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#363 + def await_for(timeout); end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @raise [Concurrent::TimeoutError] when timout is reached + # @return [Boolean] true if all actions complete before timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#377 + def await_for!(timeout); end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 + def deref; end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 + def error; end + + # The error mode this Agent is operating in. See {#initialize} for details. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#184 + def error_mode; end + + # Is the Agent in a failed state? + # + # @return [Boolean] + # @see #restart + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 + def failed?; end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 + def post(*args, &action); end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 + def reason; end + + # When an Agent is {#failed?}, changes the Agent {#value} to `new_value` + # then un-fails the Agent so that action dispatches are allowed again. If + # the `:clear_actions` option is give and true, any actions queued on the + # Agent that were being held while it was failed will be discarded, + # otherwise those held actions will proceed. The `new_value` must pass the + # validator if any, or `restart` will raise an exception and the Agent will + # remain failed with its old {#value} and {#error}. Observers, if any, will + # not be notified of the new state. + # + # @option opts + # @param new_value [Object] the new value for the Agent once restarted + # @param opts [Hash] the configuration options + # @raise [Concurrent:AgentError] when not failed + # @return [Boolean] true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#424 + def restart(new_value, opts = T.unsafe(nil)); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#278 + def send(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#287 + def send!(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 + def send_off(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#302 + def send_off!(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @param executor [Concurrent::ExecutorService] the executor on which the + # action is to be dispatched + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#311 + def send_via(executor, *args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param args [Array] zero or more arguments to be passed to + # the action + # @param action [Proc] the action dispatch to be enqueued + # @param executor [Concurrent::ExecutorService] the executor on which the + # action is to be dispatched + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#319 + def send_via!(executor, *args, &action); end + + # Is the Agent in a failed state? + # + # @return [Boolean] + # @see #restart + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 + def stopped?; end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 + def value; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. Will block indefinitely when timeout is nil or not given. + # + # Provided mainly for consistency with other classes in this library. Prefer + # the various `await` methods instead. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#393 + def wait(timeout = T.unsafe(nil)); end + + private + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#510 + def enqueue_action_job(action, args, executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#516 + def enqueue_await_job(latch); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#543 + def execute_next_job; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#576 + def handle_error(error); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#529 + def ns_enqueue_job(job, index = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#584 + def ns_find_last_job_for_thread; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#490 + def ns_initialize(initial, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#539 + def ns_post_next_job; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#570 + def ns_validate(value); end + + class << self + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far to all the given Agents, from this thread or nested by the + # given Agents, have occurred. Will block when any of the agents are + # failed. Will never return if a failed Agent is restart with + # `:clear_actions` true. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param agents [Array] the Agents on which to wait + # @return [Boolean] true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#449 + def await(*agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @param agents [Array] the Agents on which to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#463 + def await_for(timeout, *agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @param agents [Array] the Agents on which to wait + # @raise [Concurrent::TimeoutError] when timout is reached + # @return [Boolean] true if all actions complete before timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#482 + def await_for!(timeout, *agents); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#154 +Concurrent::Agent::AWAIT_ACTION = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#151 +Concurrent::Agent::AWAIT_FLAG = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#157 +Concurrent::Agent::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#160 +Concurrent::Agent::DEFAULT_VALIDATOR = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#148 +Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) + +# Raised during action processing or any other time in an Agent's lifecycle. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#167 +class Concurrent::Agent::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#168 + def initialize(message = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 +class Concurrent::Agent::Job < ::Struct + # Returns the value of attribute action + # + # @return [Object] the current value of action + def action; end + + # Sets the attribute action + # + # @param value [Object] the value to set the attribute action to. + # @return [Object] the newly set value + def action=(_); end + + # Returns the value of attribute args + # + # @return [Object] the current value of args + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + def args=(_); end + + # Returns the value of attribute caller + # + # @return [Object] the current value of caller + def caller; end + + # Sets the attribute caller + # + # @param value [Object] the value to set the attribute caller to. + # @return [Object] the newly set value + def caller=(_); end + + # Returns the value of attribute executor + # + # @return [Object] the current value of executor + def executor; end + + # Sets the attribute executor + # + # @param value [Object] the value to set the attribute executor to. + # @return [Object] the newly set value + def executor=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Raised when a new value obtained during action processing or at `#restart` +# fails validation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#176 +class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error + # @return [ValidationError] a new instance of ValidationError + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#177 + def initialize(message = T.unsafe(nil)); end +end + +# A thread-safe subclass of Array. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`. +# +# @note `a += b` is **not** a **thread-safe** operation on +# `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` +# which is concatenation of `a` and `b`, then it writes the concatenation to `a`. +# The read and write are independent operations they do not form a single atomic +# operation therefore when two `+=` operations are executed concurrently updates +# may be lost. Use `#concat` instead. +# @see http://ruby-doc.org/core/Array.html Ruby standard library `Array` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#53 +class Concurrent::Array < ::Array; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#22 +Concurrent::ArrayImplementation = Array + +# A mixin module that provides simple asynchronous behavior to a class, +# turning it into a simple actor. Loosely based on Erlang's +# [gen_server](http://www.erlang.org/doc/man/gen_server.html), but without +# supervision or linking. +# +# A more feature-rich {Concurrent::Actor} is also available when the +# capabilities of `Async` are too limited. +# +# ```cucumber +# Feature: +# As a stateful, plain old Ruby class +# I want safe, asynchronous behavior +# So my long-running methods don't block the main thread +# ``` +# +# The `Async` module is a way to mix simple yet powerful asynchronous +# capabilities into any plain old Ruby object or class, turning each object +# into a simple Actor. Method calls are processed on a background thread. The +# caller is free to perform other actions while processing occurs in the +# background. +# +# Method calls to the asynchronous object are made via two proxy methods: +# `async` (alias `cast`) and `await` (alias `call`). These proxy methods post +# the method call to the object's background thread and return a "future" +# which will eventually contain the result of the method call. +# +# This behavior is loosely patterned after Erlang's `gen_server` behavior. +# When an Erlang module implements the `gen_server` behavior it becomes +# inherently asynchronous. The `start` or `start_link` function spawns a +# process (similar to a thread but much more lightweight and efficient) and +# returns the ID of the process. Using the process ID, other processes can +# send messages to the `gen_server` via the `cast` and `call` methods. Unlike +# Erlang's `gen_server`, however, `Async` classes do not support linking or +# supervision trees. +# +# ## Basic Usage +# +# When this module is mixed into a class, objects of the class become inherently +# asynchronous. Each object gets its own background thread on which to post +# asynchronous method calls. Asynchronous method calls are executed in the +# background one at a time in the order they are received. +# +# To create an asynchronous class, simply mix in the `Concurrent::Async` module: +# +# ``` +# class Hello +# include Concurrent::Async +# +# def hello(name) +# "Hello, #{name}!" +# end +# end +# ``` +# +# Mixing this module into a class provides each object two proxy methods: +# `async` and `await`. These methods are thread safe with respect to the +# enclosing object. The former proxy allows methods to be called +# asynchronously by posting to the object's internal thread. The latter proxy +# allows a method to be called synchronously but does so safely with respect +# to any pending asynchronous method calls and ensures proper ordering. Both +# methods return a {Concurrent::IVar} which can be inspected for the result +# of the proxied method call. Calling a method with `async` will return a +# `:pending` `IVar` whereas `await` will return a `:complete` `IVar`. +# +# ``` +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# ``` +# +# ## Let It Fail +# +# The `async` and `await` proxy methods have built-in error protection based +# on Erlang's famous "let it fail" philosophy. Instance methods should not be +# programmed defensively. When an exception is raised by a delegated method +# the proxy will rescue the exception, expose it to the caller as the `reason` +# attribute of the returned future, then process the next method call. +# +# ## Calling Methods Internally +# +# External method calls should *always* use the `async` and `await` proxy +# methods. When one method calls another method, the `async` proxy should +# rarely be used and the `await` proxy should *never* be used. +# +# When an object calls one of its own methods using the `await` proxy the +# second call will be enqueued *behind* the currently running method call. +# Any attempt to wait on the result will fail as the second call will never +# run until after the current call completes. +# +# Calling a method using the `await` proxy from within a method that was +# itself called using `async` or `await` will irreversibly deadlock the +# object. Do *not* do this, ever. +# +# ## Instance Variables and Attribute Accessors +# +# Instance variables do not need to be thread-safe so long as they are private. +# Asynchronous method calls are processed in the order they are received and +# are processed one at a time. Therefore private instance variables can only +# be accessed by one thread at a time. This is inherently thread-safe. +# +# When using private instance variables within asynchronous methods, the best +# practice is to read the instance variable into a local variable at the start +# of the method then update the instance variable at the *end* of the method. +# This way, should an exception be raised during method execution the internal +# state of the object will not have been changed. +# +# ### Reader Attributes +# +# The use of `attr_reader` is discouraged. Internal state exposed externally, +# when necessary, should be done through accessor methods. The instance +# variables exposed by these methods *must* be thread-safe, or they must be +# called using the `async` and `await` proxy methods. These two approaches are +# subtly different. +# +# When internal state is accessed via the `async` and `await` proxy methods, +# the returned value represents the object's state *at the time the call is +# processed*, which may *not* be the state of the object at the time the call +# is made. +# +# To get the state *at the current* time, irrespective of an enqueued method +# calls, a reader method must be called directly. This is inherently unsafe +# unless the instance variable is itself thread-safe, preferably using one +# of the thread-safe classes within this library. Because the thread-safe +# classes within this library are internally-locking or non-locking, they can +# be safely used from within asynchronous methods without causing deadlocks. +# +# Generally speaking, the best practice is to *not* expose internal state via +# reader methods. The best practice is to simply use the method's return value. +# +# ### Writer Attributes +# +# Writer attributes should never be used with asynchronous classes. Changing +# the state externally, even when done in the thread-safe way, is not logically +# consistent. Changes to state need to be timed with respect to all asynchronous +# method calls which my be in-process or enqueued. The only safe practice is to +# pass all necessary data to each method as arguments and let the method update +# the internal state as necessary. +# +# ## Class Constants, Variables, and Methods +# +# ### Class Constants +# +# Class constants do not need to be thread-safe. Since they are read-only and +# immutable they may be safely read both externally and from within +# asynchronous methods. +# +# ### Class Variables +# +# Class variables should be avoided. Class variables represent shared state. +# Shared state is anathema to concurrency. Should there be a need to share +# state using class variables they *must* be thread-safe, preferably +# using the thread-safe classes within this library. When updating class +# variables, never assign a new value/object to the variable itself. Assignment +# is not thread-safe in Ruby. Instead, use the thread-safe update functions +# of the variable itself to change the value. +# +# The best practice is to *never* use class variables with `Async` classes. +# +# ### Class Methods +# +# Class methods which are pure functions are safe. Class methods which modify +# class variables should be avoided, for all the reasons listed above. +# +# ## An Important Note About Thread Safe Guarantees +# +# > Thread safe guarantees can only be made when asynchronous method calls +# > are not mixed with direct method calls. Use only direct method calls +# > when the object is used exclusively on a single thread. Use only +# > `async` and `await` when the object is shared between threads. Once you +# > call a method using `async` or `await`, you should no longer call methods +# > directly on the object. Use `async` and `await` exclusively from then on. +# +# @example +# +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# @see Concurrent::Actor +# @see https://en.wikipedia.org/wiki/Actor_model "Actor Model" at Wikipedia +# @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server +# @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#217 +module Concurrent::Async + mixes_in_class_methods ::Concurrent::Async::ClassMethods + + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 + def async; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 + def await; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 + def call; end + + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 + def cast; end + + # Initialize the internal serializer and other stnchronization mechanisms. + # + # @note This method *must* be called immediately upon object construction. + # This is the only way thread-safe initialization can be guaranteed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#441 + def init_synchronization; end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#262 + def included(base); end + + # Check for the presence of a method on an object and determine if a given + # set of arguments matches the required arity. + # + # @note This check is imperfect because of the way Ruby reports the arity of + # methods with a variable number of arguments. It is possible to determine + # if too few arguments are given but impossible to determine if too many + # arguments are given. This check may also fail to recognize dynamic behavior + # of the object, such as methods simulated with `method_missing`. + # @param obj [Object] the object to check against + # @param method [Symbol] the method to check the object for + # @param args [Array] zero or more arguments for the arity check + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity + # @see http://ruby-doc.org/core-2.1.0/Object.html#method-i-respond_to-3F Object#respond_to? + # @see http://www.ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing BasicObject#method_missing + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#250 + def validate_argc(obj, method, *args); end + end +end + +# Delegates asynchronous, thread-safe method calls to the wrapped object. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#282 +class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject + # Create a new delegator object wrapping the given delegate. + # + # @param delegate [Object] the object to wrap and delegate method calls to + # @return [AsyncDelegator] a new instance of AsyncDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#288 + def initialize(delegate); end + + # Delegates method calls to the wrapped object. + # + # @param method [Symbol] the method being called + # @param args [Array] zero or more arguments to the method + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @return [IVar] the result of the method call + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#305 + def method_missing(method, *args, &block); end + + # Perform all enqueued tasks. + # + # This method must be called from within the executor. It must not be + # called while already running. It will loop until the queue is empty. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#330 + def perform; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#348 + def reset_if_forked; end + + private + + # Check whether the method is responsive + # + # @param method [Symbol] the method being called + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#322 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# Delegates synchronous, thread-safe method calls to the wrapped object. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#360 +class Concurrent::Async::AwaitDelegator + # Create a new delegator object wrapping the given delegate. + # + # @param delegate [AsyncDelegator] the object to wrap and delegate method calls to + # @return [AwaitDelegator] a new instance of AwaitDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#365 + def initialize(delegate); end + + # Delegates method calls to the wrapped object. + # + # @param method [Symbol] the method being called + # @param args [Array] zero or more arguments to the method + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @return [IVar] the result of the method call + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#378 + def method_missing(method, *args, &block); end + + private + + # Check whether the method is responsive + # + # @param method [Symbol] the method being called + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#387 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#269 +module Concurrent::Async::ClassMethods + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#270 + def new(*args, **_arg1, &block); end +end + +# Atoms provide a way to manage shared, synchronous, independent state. +# +# An atom is initialized with an initial value and an optional validation +# proc. At any time the value of the atom can be synchronously and safely +# changed. If a validator is given at construction then any new value +# will be checked against the validator and will be rejected if the +# validator returns false or raises an exception. +# +# There are two ways to change the value of an atom: {#compare_and_set} and +# {#swap}. The former will set the new value if and only if it validates and +# the current value matches the new value. The latter will atomically set the +# new value to the result of running the given block if and only if that +# value validates. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an atom with an initial value +# atom = Concurrent::Atom.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# atom.swap{|set| next_fibonacci(set) } +# end +# +# # get the current value +# atom.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Atoms support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time the value of the Atom changes. +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Atom when the change began +# The `new_value` is the value to which the Atom was set when the change +# completed. Note that `old_value` and `new_value` may be the same. This is +# not an error. It simply means that the change operation returned the same +# value. +# +# Unlike in Clojure, `Atom` cannot participate in {Concurrent::TVar} transactions. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @see http://clojure.org/atoms Clojure Atoms +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#95 +class Concurrent::Atom < ::Concurrent::Synchronization::Object + include ::Concurrent::Concern::Observable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new atom with the given initial value. + # + # @option opts + # @param value [Object] The initial value + # @param opts [Hash] The options used to configure the atom + # @raise [ArgumentError] if the validator is not a `Proc` (when given) + # @return [Atom] a new instance of Atom + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#121 + def initialize(value, opts = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # Atomically sets the value of atom to the new value if and only if the + # current value of the atom is identical to the old value and the new + # value successfully validates against the (optional) validator given + # at construction. + # + # @param old_value [Object] The expected current value. + # @param new_value [Object] The intended new value. + # @return [Boolean] True if the value is changed else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#181 + def compare_and_set(old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def deref; end + + # Atomically sets the value of atom to the new value without regard for the + # current value so long as the new value successfully validates against the + # (optional) validator given at construction. + # + # @param new_value [Object] The intended new value. + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#198 + def reset(new_value); end + + # Atomically swaps the value of atom using the given block. The current + # value will be passed to the block, as will any arguments passed as + # arguments to the function. The new value will be validated against the + # (optional) validator proc given at construction. If validation fails the + # value will not be changed. + # + # Internally, {#swap} reads the current value, applies the block to it, and + # attempts to compare-and-set it in. Since another thread may have changed + # the value in the intervening time, it may have to retry, and does so in a + # spin loop. The net effect is that the value will always be the result of + # the application of the supplied block to a current value, atomically. + # However, because the block might be called multiple times, it must be free + # of side effects. + # + # @note The given block may be called multiple times, and thus should be free + # of side effects. + # @param args [Object] Zero or more arguments passed to the block. + # @raise [ArgumentError] When no block is given. + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # @yield [value, args] Calculates a new value for the atom based on the + # current value and any supplied arguments. + # @yieldparam value [Object] The current value of the atom. + # @yieldparam args [Object] All arguments passed to the function, in order. + # @yieldreturn [Object] The intended new value of the atom. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#157 + def swap(*args); end + + # The current value of the atom. + # + # @return [Object] The current value. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def value; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_value(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_value(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_value(&block); end + + # Is the new value valid? + # + # @param new_value [Object] The intended new value. + # @return [Boolean] false if the validator function returns false or raises + # an exception else true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#216 + def valid?(new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def value=(value); end +end + +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#119 +class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#82 +Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean + +# Define update methods that use direct paths +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#9 +module Concurrent::AtomicDirectUpdate + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#15 + def try_update; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#24 + def try_update!; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#10 + def update; end +end + +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#136 +class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#99 +Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum + +# An atomic reference which maintains an object reference along with a mark bit +# that can be updated atomically. +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html java.util.concurrent.atomic.AtomicMarkableReference +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#10 +class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AtomicMarkableReference] a new instance of AtomicMarkableReference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#15 + def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # @param expected_val [Object] the expected value + # @param new_val [Object] the new value + # @param expected_mark [Boolean] the expected mark + # @param new_mark [Boolean] the new mark + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 + def compare_and_set(expected_val, new_val, expected_mark, new_mark); end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # @param expected_val [Object] the expected value + # @param new_val [Object] the new value + # @param expected_mark [Boolean] the expected mark + # @param new_mark [Boolean] the new mark + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 + def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end + + # Gets the current reference and marked values. + # + # @return [Array] the current reference and marked values + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#64 + def get; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 + def mark; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 + def marked?; end + + # _Unconditionally_ sets to the given value of both the reference and + # the mark. + # + # @param new_val [Object] the new value + # @param new_mark [Boolean] the new mark + # @return [Array] both the new value and the new mark + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#91 + def set(new_val, new_mark); end + + # Pass the current value to the given block, replacing it with the + # block's result. Simply return nil if update fails. + # + # the update failed + # + # @return [Array] the new value and marked state, or nil if + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#152 + def try_update; end + + # Pass the current value to the given block, replacing it + # with the block's result. Raise an exception if the update + # fails. + # + # @raise [Concurrent::ConcurrentUpdateError] if the update fails + # @return [Array] the new value and marked state + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#128 + def try_update!; end + + # Pass the current value and marked state to the given block, replacing it + # with the block's results. May retry if the value changes during the + # block's execution. + # + # @return [Array] the new value and new mark + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # @yieldparam old_mark [Boolean] the starting state of marked + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#105 + def update; end + + # Gets the current value of the reference + # + # @return [Object] the current value of the reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#71 + def value; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_reference(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#163 + def immutable_array(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def reference; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def reference=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_reference(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_reference(&block); end +end + +# Special "compare and set" handling of numeric values. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#7 +module Concurrent::AtomicNumericCompareAndSetWrapper + # Atomically sets the value to the given updated value if + # the current value == the expected value. + # + # that the actual value was not equal to the expected value. + # + # @param old_value [Object] the expected value + # @param new_value [Object] the new value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 + def compare_and_set(old_value, new_value); end +end + +# An object reference that may be updated atomically. All read and write +# operations have java volatile semantic. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/package-summary.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#126 +class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#18 +Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#30 +class Concurrent::CRubySet < ::Set + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#18 + def initialize(*args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def &(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def +(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def -(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <<(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <=(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def <=>(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def ==(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def ===(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def >(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def >=(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def ^(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def add(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def add?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def classify(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def clear(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def collect!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def compare_by_identity(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def compare_by_identity?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def delete(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def delete?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def delete_if(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def difference(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def disjoint?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def divide(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def each(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def empty?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def eql?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def filter!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def flatten(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def flatten!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def flatten_merge(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def freeze(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def hash(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def include?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def inspect(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def intersect?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def intersection(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def join(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def keep_if(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def length(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def map!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def member?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def merge(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def pretty_print(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def pretty_print_cycle(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def proper_subset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def proper_superset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def reject!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def replace(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def reset(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def select!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def size(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def subset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def subtract(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def superset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def to_a(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def to_s(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def to_set(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def union(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#32 + def |(*args); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#23 + def initialize_copy(other); end +end + +# A thread pool that dynamically grows and shrinks to fit the current workload. +# New threads are created as needed, existing threads are reused, and threads +# that remain idle for too long are killed and removed from the pool. These +# pools are particularly suited to applications that perform a high volume of +# short-lived tasks. +# +# On creation a `CachedThreadPool` has zero running threads. New threads are +# created on the pool as new operations are `#post`. The size of the pool +# will grow until `#max_length` threads are in the pool or until the number +# of threads exceeds the number of running and pending operations. When a new +# operation is post to the pool the first available idle thread will be tasked +# with the new operation. +# +# Should a thread crash for any reason the thread will immediately be removed +# from the pool. Similarly, threads which remain idle for an extended period +# of time will be killed and reclaimed. Thus these thread pools are very +# efficient at reclaiming unused resources. +# +# The API and behavior of this class are based on Java's `CachedThreadPool` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#27 +class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor + # Create a new thread pool. + # + # @option opts + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @return [CachedThreadPool] a new instance of CachedThreadPool + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#39 + def initialize(opts = T.unsafe(nil)); end + + private + + # Create a new thread pool. + # + # @option opts + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#51 + def ns_initialize(opts); end +end + +# Raised when an asynchronous operation is cancelled before execution. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#9 +class Concurrent::CancelledOperationError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#7 +module Concurrent::Collection; end + +# A thread safe observer set implemented using copy-on-read approach: +# observers are added and removed from a thread safe collection; every time +# a notification is required the internal data structure is copied to +# prevent concurrency issues +# +# @api private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#12 +class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject + # @api private + # @return [CopyOnNotifyObserverSet] a new instance of CopyOnNotifyObserverSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#14 + def initialize; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#20 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#55 + def count_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#39 + def delete_observer(observer); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#47 + def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#72 + def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#62 + def notify_observers(*args, &block); end + + protected + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#80 + def ns_initialize; end + + private + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#86 + def duplicate_and_clear_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#94 + def duplicate_observers; end + + # @api private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#98 + def notify_to(observers, *args); end +end + +# A thread safe observer set implemented using copy-on-write approach: +# every time an observer is added or removed the whole internal data structure is +# duplicated and replaced with a new one. +# +# @api private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#11 +class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchronization::LockableObject + # @api private + # @return [CopyOnWriteObserverSet] a new instance of CopyOnWriteObserverSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#13 + def initialize; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#19 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#56 + def count_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#40 + def delete_observer(observer); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#50 + def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#72 + def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#63 + def notify_observers(*args, &block); end + + protected + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#80 + def ns_initialize; end + + private + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#102 + def clear_observers_and_return_old; end + + # @api private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#86 + def notify_to(observers, *args); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#94 + def observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#98 + def observers=(new_set); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#10 +Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#10 +class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend + # @return [MriMapBackend] a new instance of MriMapBackend + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#12 + def initialize(options = T.unsafe(nil), &default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 + def []=(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#61 + def clear; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#33 + def compute(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#21 + def compute_if_absent(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#29 + def compute_if_present(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#53 + def delete(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#57 + def delete_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#49 + def get_and_set(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#37 + def merge_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#45 + def replace_if_exists(key, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#41 + def replace_pair(key, old_value, new_value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#9 +class Concurrent::Collection::NonConcurrentMapBackend + # WARNING: all public methods of the class must operate on the @backend + # directly without calling each other. This is important because of the + # SynchronizedMapBackend which uses a non-reentrant mutex for performance + # reasons. + # + # @return [NonConcurrentMapBackend] a new instance of NonConcurrentMapBackend + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#15 + def initialize(options = T.unsafe(nil), &default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 + def [](key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#25 + def []=(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#94 + def clear; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#59 + def compute(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#29 + def compute_if_absent(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#53 + def compute_if_present(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#81 + def delete(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#85 + def delete_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#99 + def each_pair; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#71 + def get_and_set(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#110 + def get_or_default(key, default_value); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#77 + def key?(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#63 + def merge_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#46 + def replace_if_exists(key, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#37 + def replace_pair(key, old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#106 + def size; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#130 + def dupped_backend; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#124 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#134 + def pair?(key, expected_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#116 + def set_backend(default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#138 + def store_computed_value(key, new_value); end +end + +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#50 +class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collection::RubyNonConcurrentPriorityQueue + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def <<(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def deq; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def enq(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 + def has_priority?(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def shift; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 + def size; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#10 +Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue + +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#8 +class Concurrent::Collection::RubyNonConcurrentPriorityQueue + # Create a new priority queue with no items. + # + # @option opts + # @param opts [Hash] the options for creating the queue + # @return [RubyNonConcurrentPriorityQueue] a new instance of RubyNonConcurrentPriorityQueue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#11 + def initialize(opts = T.unsafe(nil)); end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def <<(item); end + + # Removes all of the elements from this priority queue. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#18 + def clear; end + + # Deletes all items from `self` that are equal to `item`. + # + # @param item [Object] the item to be removed from the queue + # @return [Object] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#25 + def delete(item); end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def deq; end + + # Returns `true` if `self` contains no elements. + # + # @return [Boolean] true if there are no items in the queue else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#43 + def empty?; end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def enq(item); end + + # Returns `true` if the given item is present in `self` (that is, if any + # element == `item`), otherwise returns false. + # + # @param item [Object] the item to search for + # @return [Boolean] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 + def has_priority?(item); end + + # Returns `true` if the given item is present in `self` (that is, if any + # element == `item`), otherwise returns false. + # + # @param item [Object] the item to search for + # @return [Boolean] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 + def include?(item); end + + # The current length of the queue. + # + # @return [Fixnum] the number of items in the queue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 + def length; end + + # Retrieves, but does not remove, the head of this queue, or returns `nil` + # if this queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#60 + def peek; end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def pop; end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def push(item); end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def shift; end + + # The current length of the queue. + # + # @return [Fixnum] the number of items in the queue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 + def size; end + + private + + # Are the items at the given indexes ordered based on the priority + # order specified at construction? + # + # @param x [Integer] the first index from which to retrieve a comparable value + # @param y [Integer] the second index from which to retrieve a comparable value + # @return [Boolean] true if the two elements are in the correct priority order + # else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#119 + def ordered?(x, y); end + + # Percolate down to maintain heap invariant. + # + # @param k [Integer] the index at which to start the percolation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#128 + def sink(k); end + + # Exchange the values at the given indexes within the internal array. + # + # @param x [Integer] the first index to swap + # @param y [Integer] the second index to swap + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#103 + def swap(x, y); end + + # Percolate up to maintain heap invariant. + # + # @param k [Integer] the index at which to start the percolation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#147 + def swim(k); end + + class << self + # @!macro priority_queue_method_from_list + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#89 + def from_list(list, opts = T.unsafe(nil)); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#2 +module Concurrent::Concern; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#8 +module Concurrent::Concern::Deprecation + include ::Logger::Severity + include ::Concurrent::Concern::Logging + extend ::Logger::Severity + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#12 + def deprecated(message, strip = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#27 + def deprecated_method(old_name, new_name); end +end + +# Object references in Ruby are mutable. This can lead to serious problems when +# the `#value` of a concurrent object is a mutable reference. Which is always the +# case unless the value is a `Fixnum`, `Symbol`, or similar "primitive" data type. +# Most classes in this library that expose a `#value` getter method do so using the +# `Dereferenceable` mixin module. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#11 +module Concurrent::Concern::Dereferenceable + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 + def deref; end + + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 + def value; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#63 + def apply_deref_options(value); end + + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining dereference behavior. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#54 + def ns_set_deref_options(opts); end + + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining dereference behavior. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#48 + def set_deref_options(opts = T.unsafe(nil)); end + + # Set the internal value of this object + # + # @param value [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#31 + def value=(value); end +end + +# Include where logging is needed +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#10 +module Concurrent::Concern::Logging + include ::Logger::Severity + + # Logs through {Concurrent.global_logger}, it can be overridden by setting @logger + # + # @param level [Integer] one of Logger::Severity constants + # @param progname [String] e.g. a path of an Actor + # @param message [String, nil] when nil block is used to generate the message + # @yieldreturn [String] a message + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#18 + def log(level, progname, message = T.unsafe(nil), &block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#10 +module Concurrent::Concern::Obligation + include ::Concurrent::Concern::Dereferenceable + + # Has the obligation completed processing? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#49 + def complete?; end + + # @example allows Obligation to be risen + # rejected_ivar = Ivar.new.fail + # raise rejected_ivar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#126 + def exception(*args); end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 + def fulfilled?; end + + # Is the obligation still awaiting completion of processing? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#56 + def incomplete?; end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 + def no_error!(timeout = T.unsafe(nil)); end + + # Is obligation completion still pending? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#35 + def pending?; end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 + def realized?; end + + # If an exception was raised during processing this will return the + # exception object. Will return `nil` when the state is pending or if + # the obligation has been successfully fulfilled. + # + # @return [Exception] the exception raised during processing or `nil` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#119 + def reason; end + + # Has the obligation been rejected? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#28 + def rejected?; end + + # The current state of the obligation. + # + # @return [Symbol] the current state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#110 + def state; end + + # Is the obligation still unscheduled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#42 + def unscheduled?; end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Object] see Dereferenceable#deref + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#65 + def value(timeout = T.unsafe(nil)); end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. Will re-raise any exceptions + # raised during processing (but will not raise an exception on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Object] see Dereferenceable#deref + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#98 + def value!(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout has been reached. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#74 + def wait(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 + def wait!(timeout = T.unsafe(nil)); end + + protected + + # Atomic compare and set operation + # State is set to `next_state` only if `current state == expected_current`. + # + # @param next_state [Symbol] + # @param expected_current [Symbol] + # @return [Boolean] true is state is changed, false otherwise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#174 + def compare_and_set_state(next_state, *expected_current); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#145 + def event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#134 + def get_arguments_from(opts = T.unsafe(nil)); end + + # Executes the block within mutex if current state is included in expected_states + # + # @return block value if executed, false otherwise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#190 + def if_state(*expected_states); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#139 + def init_obligation; end + + # Am I in the current state? + # + # @param expected [Symbol] The state to check against + # @return [Boolean] true if in the expected state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#210 + def ns_check_state?(expected); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#215 + def ns_set_state(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#150 + def set_state(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#161 + def state=(value); end +end + +# The [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) is one +# of the most useful design patterns. +# +# The workflow is very simple: +# - an `observer` can register itself to a `subject` via a callback +# - many `observers` can be registered to the same `subject` +# - the `subject` notifies all registered observers when its status changes +# - an `observer` can deregister itself when is no more interested to receive +# event notifications +# +# In a single threaded environment the whole pattern is very easy: the +# `subject` can use a simple data structure to manage all its subscribed +# `observer`s and every `observer` can react directly to every event without +# caring about synchronization. +# +# In a multi threaded environment things are more complex. The `subject` must +# synchronize the access to its data structure and to do so currently we're +# using two specialized ObserverSet: {Concurrent::Concern::CopyOnWriteObserverSet} +# and {Concurrent::Concern::CopyOnNotifyObserverSet}. +# +# When implementing and `observer` there's a very important rule to remember: +# **there are no guarantees about the thread that will execute the callback** +# +# Let's take this example +# ``` +# class Observer +# def initialize +# @count = 0 +# end +# +# def update +# @count += 1 +# end +# end +# +# obs = Observer.new +# [obj1, obj2, obj3, obj4].each { |o| o.add_observer(obs) } +# # execute [obj1, obj2, obj3, obj4] +# ``` +# +# `obs` is wrong because the variable `@count` can be accessed by different +# threads at the same time, so it should be synchronized (using either a Mutex +# or an AtomicFixum) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#50 +module Concurrent::Concern::Observable + # Adds an observer to this set. If a block is passed, the observer will be + # created by this method and no other params should be passed. + # + # @param observer [Object] the observer to add + # @param func [Symbol] the function to call on the observer during notification. + # Default is :update + # @return [Object] the added observer + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#61 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # Return the number of observers associated with this object. + # + # @return [Integer] the observers count + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#101 + def count_observers; end + + # Remove `observer` as an observer on this object so that it will no + # longer receive notifications. + # + # @param observer [Object] the observer to remove + # @return [Object] the deleted observer + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#82 + def delete_observer(observer); end + + # Remove all observers associated with this object. + # + # @return [Observable] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#91 + def delete_observers; end + + # As `#add_observer` but can be used for chaining. + # + # @param observer [Object] the observer to add + # @param func [Symbol] the function to call on the observer during notification. + # @return [Observable] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#70 + def with_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + protected + + # Returns the value of attribute observers. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 + def observers; end + + # Sets the attribute observers + # + # @param value the value to set the attribute observers to. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 + def observers=(_arg0); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#70 +class Concurrent::ConcurrentUpdateError < ::ThreadError; end + +# frozen pre-allocated backtrace to speed ConcurrentUpdateError +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#72 +Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), Array) + +# Raised when errors occur during configuration. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#6 +class Concurrent::ConfigurationError < ::Concurrent::Error; end + +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# @example Waiter and Decrementer +# latch = Concurrent::CountDownLatch.new(3) +# +# waiter = Thread.new do +# latch.wait() +# puts ("Waiter released") +# end +# +# decrementer = Thread.new do +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# end +# +# [waiter, decrementer].each(&:join) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#98 +class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#56 +Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch + +# A synchronization aid that allows a set of threads to all wait for each +# other to reach a common barrier point. +# +# @example +# barrier = Concurrent::CyclicBarrier.new(3) +# jobs = Array.new(3) { |i| -> { sleep i; p done: i } } +# process = -> (i) do +# # waiting to start at the same time +# barrier.wait +# # execute job +# jobs[i].call +# # wait for others to finish +# barrier.wait +# end +# threads = 2.times.map do |i| +# Thread.new(i, &process) +# end +# +# # use main as well +# process.call 2 +# +# # here we can be sure that all jobs are processed +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#27 +class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject + # Create a new `CyclicBarrier` that waits for `parties` threads + # + # @param parties [Fixnum] the number of parties + # @raise [ArgumentError] if `parties` is not an integer or is less than zero + # @return [CyclicBarrier] a new instance of CyclicBarrier + # @yield an optional block that will be executed that will be executed after + # the last thread arrives and before the others are released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#40 + def initialize(parties, &block); end + + # A barrier can be broken when: + # - a thread called the `reset` method while at least one other thread was waiting + # - at least one thread timed out on `wait` method + # + # A broken barrier can be restored using `reset` it's safer to create a new one + # + # @return [Boolean] true if the barrier is broken otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#105 + def broken?; end + + # @return [Fixnum] the number of threads currently waiting on the barrier + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#54 + def number_waiting; end + + # @return [Fixnum] the number of threads needed to pass the barrier + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#49 + def parties; end + + # resets the barrier to its initial state + # If there is at least one waiting thread, it will be woken up, the `wait` + # method will return false and the barrier will be broken + # If the barrier is broken, this method restores it to the original state + # + # @return [nil] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#95 + def reset; end + + # Blocks on the barrier until the number of waiting threads is equal to + # `parties` or until `timeout` is reached or `reset` is called + # If a block has been passed to the constructor, it will be executed once by + # the last arrived thread before releasing the others + # + # @param timeout [Fixnum] the number of seconds to wait for the counter or + # `nil` to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on + # `timeout` or on `reset` or if the barrier is broken + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#66 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#111 + def ns_generation_done(generation, status, continue = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#122 + def ns_initialize(parties, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#117 + def ns_next_generation; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 +class Concurrent::CyclicBarrier::Generation < ::Struct + # Returns the value of attribute status + # + # @return [Object] the current value of status + def status; end + + # Sets the attribute status + # + # @param value [Object] the value to set the attribute status to. + # @return [Object] the newly set value + def status=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Lazy evaluation of a block yielding an immutable result. Useful for +# expensive operations that may never be needed. It may be non-blocking, +# supports the `Concern::Obligation` interface, and accepts the injection of +# custom executor upon which to execute the block. Processing of +# block will be deferred until the first time `#value` is called. +# At that time the caller can choose to return immediately and let +# the block execute asynchronously, block indefinitely, or block +# with a timeout. +# +# When a `Delay` is created its state is set to `pending`. The value and +# reason are both `nil`. The first time the `#value` method is called the +# enclosed opration will be run and the calling thread will block. Other +# threads attempting to call `#value` will block as well. Once the operation +# is complete the *value* will be set to the result of the operation or the +# *reason* will be set to the raised exception, as appropriate. All threads +# blocked on `#value` will return. Subsequent calls to `#value` will immediately +# return the cached value. The operation will only be run once. This means that +# any side effects created by the operation will only happen once as well. +# +# `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread +# safety of the reference returned by `#value`. +# +# @note The default behavior of `Delay` is to block indefinitely when +# calling either `value` or `wait`, executing the delayed operation on +# the current thread. This makes the `timeout` value completely +# irrelevant. To enable non-blocking behavior, use the `executor` +# constructor option. This will cause the delayed operation to be +# execute on the given executor, allowing the call to timeout. +# @see Concurrent::Concern::Dereferenceable +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#44 +class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + + # Create a new `Delay` in the `:pending` state. + # + # @raise [ArgumentError] if no block is given + # @return [Delay] a new instance of Delay + # @yield the delayed operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#62 + def initialize(opts = T.unsafe(nil), &block); end + + # Reconfigures the block returning the value if still `#incomplete?` + # + # @return [true, false] if success + # @yield the delayed operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#146 + def reconfigure(&block); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception this method will return nil. The exception object + # can be accessed via the `#reason` method. + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Numeric] the maximum number of seconds to wait + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#77 + def value(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception, this method will raise that exception (even when) + # the operation has already been executed). + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Numeric] the maximum number of seconds to wait + # @raise [Exception] when `#rejected?` raises `#reason` + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#113 + def value!(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Integer] (nil) the maximum number of seconds to wait for + # the value to be computed. When `nil` the caller will block indefinitely. + # @return [Object] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#132 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#160 + def ns_initialize(opts, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#173 + def execute_task_once; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#7 +class Concurrent::DependencyCounter + # @return [DependencyCounter] a new instance of DependencyCounter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#9 + def initialize(count, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#14 + def update(time, value, reason); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#3 +class Concurrent::Error < ::StandardError; end + +# Old school kernel-style event reminiscent of Win32 programming in C++. +# +# When an `Event` is created it is in the `unset` state. Threads can choose to +# `#wait` on the event, blocking until released by another thread. When one +# thread wants to alert all blocking threads it calls the `#set` method which +# will then wake up all listeners. Once an `Event` has been set it remains set. +# New threads calling `#wait` will return immediately. An `Event` may be +# `#reset` at any time once it has been set. +# +# @example +# event = Concurrent::Event.new +# +# t1 = Thread.new do +# puts "t1 is waiting" +# event.wait(1) +# puts "event occurred" +# end +# +# t2 = Thread.new do +# puts "t2 calling set" +# event.set +# end +# +# [t1, t2].each(&:join) +# +# # prints: +# # t1 is waiting +# # t2 calling set +# # event occurred +# @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#36 +class Concurrent::Event < ::Concurrent::Synchronization::LockableObject + # Creates a new `Event` in the unset state. Threads calling `#wait` on the + # `Event` will block. + # + # @return [Event] a new instance of Event + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#40 + def initialize; end + + # Reset a previously set event back to the `unset` state. + # Has no effect if the `Event` has not yet been set. + # + # @return [Boolean] should always return `true` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#68 + def reset; end + + # Trigger the event, setting the state to `set` and releasing all threads + # waiting on the event. Has no effect if the `Event` has already been set. + # + # @return [Boolean] should always return `true` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#56 + def set; end + + # Is the object in the set state? + # + # @return [Boolean] indicating whether or not the `Event` has been set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#48 + def set?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#60 + def try?; end + + # Wait a given number of seconds for the `Event` to be set by another + # thread. Will wait forever when no `timeout` value is given. Returns + # immediately if the `Event` has already been set. + # + # @return [Boolean] true if the `Event` was set before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#83 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#104 + def ns_initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#96 + def ns_set; end +end + +# A synchronization point at which threads can pair and swap elements within +# pairs. Each thread presents some object on entry to the exchange method, +# matches with a partner thread, and receives its partner's object on return. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# This implementation is very simple, using only a single slot for each +# exchanger (unlike more advanced implementations which use an "arena"). +# This approach will work perfectly fine when there are only a few threads +# accessing a single `Exchanger`. Beyond a handful of threads the performance +# will degrade rapidly due to contention on the single slot, but the algorithm +# will remain correct. +# +# @example +# +# exchanger = Concurrent::Exchanger.new +# +# threads = [ +# Thread.new { puts "first: " << exchanger.exchange('foo', 1) }, #=> "first: bar" +# Thread.new { puts "second: " << exchanger.exchange('bar', 1) } #=> "second: foo" +# ] +# threads.each {|t| t.join(2) } +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Exchanger.html java.util.concurrent.Exchanger +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#336 +class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#327 +Concurrent::ExchangerImplementation = Concurrent::RubyExchanger + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#157 +module Concurrent::ExecutorService + include ::Logger::Severity + include ::Concurrent::Concern::Logging + + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # Does the task queue have a maximum size? + # + # @note Always returns `false` + # @return [Boolean] True if the task queue has a maximum size else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#174 + def can_overflow?; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#161 + def post(*args, &task); end + + # Does this executor guarantee serialization of its operations? + # + # @note Always returns `false` + # @return [Boolean] True if the executor guarantees that all operations + # will be post in the order they are received and no two operations may + # occur simultaneously. Else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#181 + def serialized?; end +end + +# A `FiberLocalVar` is a variable where the value is different for each fiber. +# Each variable may have a default value, but when you modify the variable only +# the current fiber will ever see that change. +# +# This is similar to Ruby's built-in fiber-local variables (`Thread.current[:name]`), +# but with these major advantages: +# * `FiberLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in fiber-local variable leaks some memory forever (it's a Symbol held forever on the fiber), +# so it's only OK to create a small amount of them. +# `FiberLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in fiber-local variables leak forever the value set on each fiber (unless set to nil explicitly). +# `FiberLocalVar` automatically removes the mapping for each fiber once the `FiberLocalVar` instance is GC'd. +# +# @example +# v = FiberLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# @example +# v = FiberLocalVar.new(14) +# +# Fiber.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end.resume +# +# Fiber.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end.resume +# +# v.value #=> 14 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#41 +class Concurrent::FiberLocalVar + # Creates a fiber local variable. + # + # @param default [Object] the default value when otherwise unset + # @param default_block [Proc] Optional block that gets called to obtain the + # default value for each fiber + # @return [FiberLocalVar] a new instance of FiberLocalVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#49 + def initialize(default = T.unsafe(nil), &default_block); end + + # Bind the given value to fiber local storage during + # execution of the given block. + # + # @param value [Object] the value to bind + # @return [Object] the value + # @yield the operation to be performed with the bound variable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#86 + def bind(value); end + + # Returns the value in the current fiber's copy of this fiber-local variable. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#68 + def value; end + + # Sets the current fiber's copy of this fiber-local variable to the specified value. + # + # @param value [Object] the value to set + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#76 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#101 + def default; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#42 +Concurrent::FiberLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::FiberLocals) + +# An array-backed storage of indexed variables per fiber. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#166 +class Concurrent::FiberLocals < ::Concurrent::AbstractLocals + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#167 + def locals; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#171 + def locals!; end +end + +# A thread pool that reuses a fixed number of threads operating off an unbounded queue. +# At any point, at most `num_threads` will be active processing tasks. When all threads are busy new +# tasks `#post` to the thread pool are enqueued until a thread becomes available. +# Should a thread crash for any reason the thread will immediately be removed +# from the pool and replaced. +# +# The API and behavior of this class are based on Java's `FixedThreadPool` +# +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#197 +class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor + # Create a new thread pool. + # + # @option opts + # @param num_threads [Integer] the number of threads to allocate + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `num_threads` is less than or equal to zero + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @return [FixedThreadPool] a new instance of FixedThreadPool + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#211 + def initialize(num_threads, opts = T.unsafe(nil)); end +end + +# {include:file:docs-source/future.md} +# +# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module +# @see http://clojuredocs.org/clojure_core/clojure.core/future Clojure's future function +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html java.util.concurrent.Future +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#21 +class Concurrent::Future < ::Concurrent::IVar + # Create a new `Future` in the `:unscheduled` state. + # + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Future] a new instance of Future + # @yield the asynchronous operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#33 + def initialize(opts = T.unsafe(nil), &block); end + + # Attempt to cancel the operation if it has not already processed. + # The operation can only be cancelled while still `pending`. It cannot + # be cancelled once it has begun processing or has completed. + # + # @return [Boolean] was the operation successfully cancelled. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#99 + def cancel; end + + # Has the operation been successfully cancelled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#111 + def cancelled?; end + + # Execute an `:unscheduled` `Future`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Future` is in any state other than `:unscheduled`. + # + # @example Instance and execute in separate steps + # future = Concurrent::Future.new{ sleep(1); 42 } + # future.state #=> :unscheduled + # future.execute + # future.state #=> :pending + # @example Instance and execute in one line + # future = Concurrent::Future.new{ sleep(1); 42 }.execute + # future.state #=> :pending + # @return [Future] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#53 + def execute; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#82 + def set(value = T.unsafe(nil), &block); end + + # Wait the given number of seconds for the operation to complete. + # On timeout attempt to cancel the operation. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Boolean] true if the operation completed before the timeout + # else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#121 + def wait_or_cancel(timeout); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#133 + def ns_initialize(value, opts); end + + class << self + # Create a new `Future` object with the given block, execute it, and return the + # `:pending` object. + # + # @example + # future = Concurrent::Future.execute{ sleep(1); 42 } + # future.state #=> :pending + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Future] the newly created `Future` in the `:pending` state + # @yield the asynchronous operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#77 + def execute(opts = T.unsafe(nil), &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#18 +Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#30 +Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#22 +Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#106 +Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#26 +Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) + +# A thread-safe subclass of Hash. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`, +# which takes the lock repeatedly when reading an item. +# +# @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#47 +class Concurrent::Hash < ::Hash; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#16 +Concurrent::HashImplementation = Hash + +# An `IVar` is like a future that you can assign. As a future is a value that +# is being computed that you can wait on, an `IVar` is a value that is waiting +# to be assigned, that you can wait on. `IVars` are single assignment and +# deterministic. +# +# Then, express futures as an asynchronous computation that assigns an `IVar`. +# The `IVar` becomes the primitive on which [futures](Future) and +# [dataflow](Dataflow) are built. +# +# An `IVar` is a single-element container that is normally created empty, and +# can only be set once. The I in `IVar` stands for immutable. Reading an +# `IVar` normally blocks until it is set. It is safe to set and read an `IVar` +# from different threads. +# +# If you want to have some parallel task set the value in an `IVar`, you want +# a `Future`. If you want to create a graph of parallel tasks all executed +# when the values they depend on are ready you want `dataflow`. `IVar` is +# generally a low-level primitive. +# +# ## Examples +# +# Create, set and get an `IVar` +# +# ```ruby +# ivar = Concurrent::IVar.new +# ivar.set 14 +# ivar.value #=> 14 +# ivar.set 2 # would now be an error +# ``` +# +# ## See Also +# +# 1. For the theory: Arvind, R. Nikhil, and K. Pingali. +# [I-Structures: Data structures for parallel computing](http://dl.acm.org/citation.cfm?id=69562). +# In Proceedings of Workshop on Graph Reduction, 1986. +# 2. For recent application: +# [DataDrivenFuture in Habanero Java from Rice](http://www.cs.rice.edu/~vs3/hjlib/doc/edu/rice/hj/api/HjDataDrivenFuture.html). +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#48 +class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + include ::Concurrent::Concern::Observable + + # Create a new `IVar` in the `:pending` state with the (optional) initial value. + # + # @option opts + # @option opts + # @option opts + # @param value [Object] the initial value + # @param opts [Hash] the options to create a message with + # @return [IVar] a new instance of IVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#62 + def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # Add an observer on this object that will receive notification on update. + # + # Upon completion the `IVar` will notify all observers in a thread-safe way. + # The `func` method of the observer will be called with three arguments: the + # `Time` at which the `Future` completed the asynchronous operation, the + # final `value` (or `nil` on rejection), and the final `reason` (or `nil` on + # fulfillment). + # + # @param observer [Object] the object that will be notified of changes + # @param func [Symbol] symbol naming the method to call when this + # `Observable` has changes` + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#81 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param reason [Object] for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 + def fail(reason = T.unsafe(nil)); end + + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 + def set(value = T.unsafe(nil)); end + + # Attempt to set the `IVar` with the given value or block. Return a + # boolean indicating the success or failure of the set operation. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [Boolean] true if the value was set else false + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 + def try_set(value = T.unsafe(nil), &block); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#202 + def check_for_block_or_value!(block_given, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#177 + def complete(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#184 + def complete_without_notification(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#190 + def notify_observers(value, reason); end + + # @raise [MultipleAssignmentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#195 + def ns_complete_without_notification(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#155 + def ns_initialize(value, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#168 + def safe_execute(task, args = T.unsafe(nil)); end +end + +# Raised when an operation is attempted which is not legal given the +# receiver's current state +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#20 +class Concurrent::IllegalOperationError < ::Concurrent::Error; end + +# An executor service which runs all operations on the current thread, +# blocking as necessary. Operations are performed in the order they are +# received and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used +# it immediately runs every `#post` operation on the current thread, blocking +# that thread until the operation is complete. This can be very beneficial +# during testing because it makes all operations deterministic. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#17 +class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService + include ::Concurrent::SerialExecutorService + + # Creates a new executor + # + # @return [ImmediateExecutor] a new instance of ImmediateExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#21 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#34 + def <<(task); end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#26 + def post(*args, &task); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#40 + def running?; end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 + def shutdown; end + + # Is the executor shutdown? + # + # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#50 + def shutdown?; end + + # Is the executor shuttingdown? + # + # @return [Boolean] `true` when not running and not shutdown, else `false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#45 + def shuttingdown?; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#62 + def wait_for_termination(timeout = T.unsafe(nil)); end +end + +# Raised when an attempt is made to violate an immutability guarantee. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#16 +class Concurrent::ImmutabilityError < ::Concurrent::Error; end + +# A thread-safe, immutable variation of Ruby's standard `Struct`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#9 +module Concurrent::ImmutableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#51 + def ==(other); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#46 + def [](member); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#56 + def each(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#62 + def each_pair(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#36 + def merge(other, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#68 + def select(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 + def to_a; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#41 + def to_h; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 + def to_s; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 + def values; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#24 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#76 + def initialize_copy(original); end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#12 + def included(base); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#82 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#92 +Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# An executor service which runs all operations on a new thread, blocking +# until it completes. Operations are performed in the order they are received +# and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used it +# immediately runs every `#post` operation on a new thread, blocking the +# current thread until the operation is complete. This is similar to how the +# ImmediateExecutor works, but the operation has the full stack of the new +# thread at its disposal. This can be helpful when the operations will spawn +# more operations on the same executor and so on - such a situation might +# overflow the single stack in case of an ImmediateExecutor, which is +# inconsistent with how it would behave for a threaded executor. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#19 +class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor + # Creates a new executor + # + # @return [IndirectImmediateExecutor] a new instance of IndirectImmediateExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#21 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#27 + def post(*args, &task); end +end + +# Raised when an object's methods are called when it has not been +# properly initialized. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#24 +class Concurrent::InitializationError < ::Concurrent::Error; end + +# Raised when a lifecycle method (such as `stop`) is called in an improper +# sequence or when the object is in an inappropriate state. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#13 +class Concurrent::LifecycleError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#6 +class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object + include ::Enumerable + extend ::Concurrent::Synchronization::SafeInitialization + + # @param head [Node] + # @return [LockFreeStack] a new instance of LockFreeStack + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#51 + def initialize(head = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#118 + def clear; end + + # @return [self] + # @yield over the cleared stack + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#142 + def clear_each(&block); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#128 + def clear_if(head); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#99 + def compare_and_clear(head); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#85 + def compare_and_pop(head); end + + # @param head [Node] + # @param value [Object] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#65 + def compare_and_push(head, value); end + + # @param head [Node] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#107 + def each(head = T.unsafe(nil)); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#58 + def empty?(head = T.unsafe(nil)); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 + def inspect; end + + # @return [Node] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#79 + def peek; end + + # @return [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#90 + def pop; end + + # @param value [Object] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#71 + def push(value); end + + # @param head [Node] + # @param new_head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#135 + def replace_if(head, new_head); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 + def to_s; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_head(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def head; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def head=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_head(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_head(&block); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#41 + def of1(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#46 + def of2(value1, value2); end + end +end + +# The singleton for empty node +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#32 +Concurrent::LockFreeStack::EMPTY = T.let(T.unsafe(nil), Concurrent::LockFreeStack::Node) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#10 +class Concurrent::LockFreeStack::Node + # @return [Node] a new instance of Node + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#23 + def initialize(value, next_node); end + + # @return [Node] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#14 + def next_node; end + + # @return [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#17 + def value; end + + # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#21 + def value=(_arg0); end + + class << self + def [](*_arg0); end + end +end + +# Either {FiberLocalVar} or {ThreadLocalVar} depending on whether Mutex (and Monitor) +# are held, respectively, per Fiber or per Thread. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#21 +Concurrent::LockLocalVar = Concurrent::FiberLocalVar + +# An `MVar` is a synchronized single element container. They are empty or +# contain one item. Taking a value from an empty `MVar` blocks, as does +# putting a value into a full one. You can either think of them as blocking +# queue of length one, or a special kind of mutable variable. +# +# On top of the fundamental `#put` and `#take` operations, we also provide a +# `#mutate` that is atomic with respect to operations on the same instance. +# These operations all support timeouts. +# +# We also support non-blocking operations `#try_put!` and `#try_take!`, a +# `#set!` that ignores existing values, a `#value` that returns the value +# without removing it or returns `MVar::EMPTY`, and a `#modify!` that yields +# `MVar::EMPTY` if the `MVar` is empty and can be used to set `MVar::EMPTY`. +# You shouldn't use these operations in the first instance. +# +# `MVar` is a [Dereferenceable](Dereferenceable). +# +# `MVar` is related to M-structures in Id, `MVar` in Haskell and `SyncVar` in Scala. +# +# Note that unlike the original Haskell paper, our `#take` is blocking. This is how +# Haskell and Scala do it today. +# +# ## See Also +# +# 1. P. Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](http://dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th +# ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), 1991. +# +# 2. S. Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](http://dl.acm.org/citation.cfm?id=237794). +# In Proceedings of the 23rd Symposium on Principles of Programming Languages +# (PoPL), 1996. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#38 +class Concurrent::MVar < ::Concurrent::Synchronization::Object + include ::Concurrent::Concern::Dereferenceable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `MVar`, either empty or with an initial value. + # + # @param opts [Hash] the options controlling how the future will be processed + # @return [MVar] a new instance of MVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#54 + def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end + + # acquires lock on the from an `MVAR`, yields the value to provided block, + # and release lock. A timeout can be set to limit the time spent blocked, + # in which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value returned by the block, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#86 + def borrow(timeout = T.unsafe(nil)); end + + # Returns if the `MVar` is currently empty. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#195 + def empty?; end + + # Returns if the `MVar` currently contains a value. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#200 + def full?; end + + # Atomically `take`, yield the value to a block for transformation, and then + # `put` the transformed value. Returns the transformed value. A timeout can + # be set to limit the time spent blocked, in which case it returns `TIMEOUT` + # if the time is exceeded. + # + # @raise [ArgumentError] + # @return [Object] the transformed value, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#123 + def modify(timeout = T.unsafe(nil)); end + + # Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet. + # + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#179 + def modify!; end + + # Put a value into an `MVar`, blocking if there is already a value until + # it is empty. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value that was put, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#103 + def put(value, timeout = T.unsafe(nil)); end + + # Non-blocking version of `put` that will overwrite an existing value. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#169 + def set!(value); end + + # Remove the value from an `MVar`, leaving it empty, and blocking if there + # isn't a value. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value that was taken, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#66 + def take(timeout = T.unsafe(nil)); end + + # Non-blocking version of `put`, that returns whether or not it was successful. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#156 + def try_put!(value); end + + # Non-blocking version of `take`, that returns `EMPTY` instead of blocking. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#142 + def try_take!; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#206 + def synchronize(&block); end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#212 + def unlocked_empty?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#216 + def unlocked_full?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#224 + def wait_for_empty(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#220 + def wait_for_full(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#228 + def wait_while(condition, timeout); end +end + +# Unique value that represents that an `MVar` was empty +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#43 +Concurrent::MVar::EMPTY = T.let(T.unsafe(nil), Object) + +# Unique value that represents that an `MVar` timed out before it was able +# to produce a value. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#47 +Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) + +# `Concurrent::Map` is a hash-like object and should have much better performance +# characteristics, especially under high concurrency, than `Concurrent::Hash`. +# However, `Concurrent::Map `is not strictly semantically equivalent to a ruby `Hash` +# -- for instance, it does not necessarily retain ordering by insertion time as `Hash` +# does. For most uses it should do fine though, and we recommend you consider +# `Concurrent::Map` instead of `Concurrent::Hash` for your concurrency-safe hash needs. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#39 +class Concurrent::Map < ::Concurrent::Collection::MriMapBackend + # Iterates over each key value pair. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 + def each; end + + # Iterates over each key. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key in the map + # @yieldparam key [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#255 + def each_key; end + + # Iterates over each key value pair. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 + def each_pair; end + + # Iterates over each value. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each value in the map + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#264 + def each_value; end + + # Is map empty? + # + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#291 + def empty?; end + + # Get a value with key, or default_value when key is absent, + # or fail when no default_value is given. + # + # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended + # to be use as a concurrency primitive with strong happens-before + # guarantees. It is not intended to be used as a high-level abstraction + # supporting complex operations. All read and write operations are + # thread safe, but no guarantees are made regarding race conditions + # between the fetch operation and yielding to the block. Additionally, + # this method does not support recursion. This is due to internal + # constraints that are very unlikely to change in the near future. + # @param key [Object] + # @param default_value [Object] + # @raise [KeyError] when key is missing and no default_value is provided + # @return [Object] the value or default value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#183 + def fetch(key, default_value = T.unsafe(nil)); end + + # Fetch value with key, or store default value when key is absent, + # or fail when no default_value is given. This is a two step operation, + # therefore not atomic. The store can overwrite other concurrently + # stored value. + # + # @param key [Object] + # @param default_value [Object] + # @return [Object] the value or default value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#205 + def fetch_or_store(key, default_value = T.unsafe(nil)); end + + # Get a value with key + # + # @param key [Object] + # @return [Object] the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 + def get(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#321 + def inspect; end + + # Find key of a value. + # + # @param value [Object] + # @return [Object, nil] key or nil when not found + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#284 + def key(value); end + + # All keys + # + # @return [::Array] keys + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#236 + def keys; end + + # @raise [TypeError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#305 + def marshal_dump; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#313 + def marshal_load(hash); end + + # Set a value with key + # + # @param key [Object] + # @param value [Object] + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 + def put(key, value); end + + # Insert value into map with key if key is absent in one atomic step. + # + # @param key [Object] + # @param value [Object] + # @return [Object, nil] the previous value when key was present or nil when there was no key + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#215 + def put_if_absent(key, value); end + + # Is the value stored in the map. Iterates over all values. + # + # @param value [Object] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#227 + def value?(value); end + + # All values + # + # @return [::Array] values + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#244 + def values; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#331 + def initialize_copy(other); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#336 + def populate_from(hash); end + + # @raise [KeyError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#327 + def raise_fetch_no_key; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#341 + def validate_options_hash!(options); end +end + +# Raised when an object with a start/stop lifecycle has been started an +# excessive number of times. Often used in conjunction with a restart +# policy or strategy. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#29 +class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end + +# A `Maybe` encapsulates an optional value. A `Maybe` either contains a value +# of (represented as `Just`), or it is empty (represented as `Nothing`). Using +# `Maybe` is a good way to deal with errors or exceptional cases without +# resorting to drastic measures such as exceptions. +# +# `Maybe` is a replacement for the use of `nil` with better type checking. +# +# For compatibility with {Concurrent::Concern::Obligation} the predicate and +# accessor methods are aliased as `fulfilled?`, `rejected?`, `value`, and +# `reason`. +# +# ## Motivation +# +# A common pattern in languages with pattern matching, such as Erlang and +# Haskell, is to return *either* a value *or* an error from a function +# Consider this Erlang code: +# +# ```erlang +# case file:consult("data.dat") of +# {ok, Terms} -> do_something_useful(Terms); +# {error, Reason} -> lager:error(Reason) +# end. +# ``` +# +# In this example the standard library function `file:consult` returns a +# [tuple](http://erlang.org/doc/reference_manual/data_types.html#id69044) +# with two elements: an [atom](http://erlang.org/doc/reference_manual/data_types.html#id64134) +# (similar to a ruby symbol) and a variable containing ancillary data. On +# success it returns the atom `ok` and the data from the file. On failure it +# returns `error` and a string with an explanation of the problem. With this +# pattern there is no ambiguity regarding success or failure. If the file is +# empty the return value cannot be misinterpreted as an error. And when an +# error occurs the return value provides useful information. +# +# In Ruby we tend to return `nil` when an error occurs or else we raise an +# exception. Both of these idioms are problematic. Returning `nil` is +# ambiguous because `nil` may also be a valid value. It also lacks +# information pertaining to the nature of the error. Raising an exception +# is both expensive and usurps the normal flow of control. All of these +# problems can be solved with the use of a `Maybe`. +# +# A `Maybe` is unambiguous with regard to whether or not it contains a value. +# When `Just` it contains a value, when `Nothing` it does not. When `Just` +# the value it contains may be `nil`, which is perfectly valid. When +# `Nothing` the reason for the lack of a value is contained as well. The +# previous Erlang example can be duplicated in Ruby in a principled way by +# having functions return `Maybe` objects: +# +# ```ruby +# result = MyFileUtils.consult("data.dat") # returns a Maybe +# if result.just? +# do_something_useful(result.value) # or result.just +# else +# logger.error(result.reason) # or result.nothing +# end +# ``` +# +# @example Returning a Maybe from a Function +# module MyFileUtils +# def self.consult(path) +# file = File.open(path, 'r') +# Concurrent::Maybe.just(file.read) +# rescue => ex +# return Concurrent::Maybe.nothing(ex) +# ensure +# file.close if file +# end +# end +# +# maybe = MyFileUtils.consult('bogus.file') +# maybe.just? #=> false +# maybe.nothing? #=> true +# maybe.reason #=> # +# +# maybe = MyFileUtils.consult('README.md') +# maybe.just? #=> true +# maybe.nothing? #=> false +# maybe.value #=> "# Concurrent Ruby\n[![Gem Version..." +# @example Using Maybe with a Block +# result = Concurrent::Maybe.from do +# Client.find(10) # Client is an ActiveRecord model +# end +# +# # -- if the record was found +# result.just? #=> true +# result.value #=> # +# +# # -- if the record was not found +# result.just? #=> false +# result.reason #=> ActiveRecord::RecordNotFound +# @example Using Maybe with the Null Object Pattern +# # In a Rails controller... +# result = ClientService.new(10).find # returns a Maybe +# render json: result.or(NullClient.new) +# @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe +# @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#104 +class Concurrent::Maybe < ::Concurrent::Synchronization::Object + include ::Comparable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `Maybe` with the given attributes. + # + # @param just [Object] The value when `Just` else `NONE`. + # @param nothing [Exception, Object] The exception when `Nothing` else `NONE`. + # @return [Maybe] The new `Maybe`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#224 + def initialize(just, nothing); end + + # Comparison operator. + # + # @return [Integer] 0 if self and other are both `Nothing`; + # -1 if self is `Nothing` and other is `Just`; + # 1 if self is `Just` and other is nothing; + # `self.just <=> other.just` if both self and other are `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#199 + def <=>(other); end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 + def fulfilled?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 + def just; end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 + def just?; end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 + def nothing; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 + def nothing?; end + + # Return either the value of self or the given default value. + # + # @return [Object] The value of self when `Just`; else the given default. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#210 + def or(other); end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 + def reason; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 + def rejected?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 + def value; end + + class << self + # Create a new `Maybe` using the given block. + # + # Runs the given block passing all function arguments to the block as block + # arguments. If the block runs to completion without raising an exception + # a new `Just` is created with the value set to the return value of the + # block. If the block raises an exception a new `Nothing` is created with + # the reason being set to the raised exception. + # + # @param args [Array] Zero or more arguments to pass to the block. + # @raise [ArgumentError] when no block given. + # @return [Maybe] The newly created object. + # @yield The block from which to create a new `Maybe`. + # @yieldparam args [Array] Zero or more block arguments passed as + # arguments to the function. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#137 + def from(*args); end + + # Create a new `Just` with the given value. + # + # @param value [Object] The value to set for the new `Maybe` object. + # @return [Maybe] The newly created object. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#152 + def just(value); end + + # Create a new `Nothing` with the given (optional) reason. + # + # @param error [Exception] The reason to set for the new `Maybe` object. + # When given a string a new `StandardError` will be created with the + # argument as the message. When no argument is given a new + # `StandardError` with an empty message will be created. + # @return [Maybe] The newly created object. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#164 + def nothing(error = T.unsafe(nil)); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end + end +end + +# Indicates that the given attribute has not been set. +# When `Just` the {#nothing} getter will return `NONE`. +# When `Nothing` the {#just} getter will return `NONE`. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#111 +Concurrent::Maybe::NONE = T.let(T.unsafe(nil), Object) + +# Raised when an attempt is made to modify an immutable object +# (such as an `IVar`) after its final state has been set. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#33 +class Concurrent::MultipleAssignmentError < ::Concurrent::Error + # @return [MultipleAssignmentError] a new instance of MultipleAssignmentError + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#36 + def initialize(message = T.unsafe(nil), inspection_data = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#41 + def inspect; end + + # Returns the value of attribute inspection_data. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#34 + def inspection_data; end +end + +# Aggregates multiple exceptions. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#58 +class Concurrent::MultipleErrors < ::Concurrent::Error + # @return [MultipleErrors] a new instance of MultipleErrors + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#61 + def initialize(errors, message = T.unsafe(nil)); end + + # Returns the value of attribute errors. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#59 + def errors; end +end + +# An thread-safe variation of Ruby's standard `Struct`. Values can be set at +# construction or safely changed at any time during the object's lifecycle. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#10 +module Concurrent::MutableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#128 + def ==(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#118 + def [](member); end + + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#185 + def []=(member, value); end + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#139 + def each(&block); end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#152 + def each_pair(&block); end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 + def inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#94 + def merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#167 + def select(&block); end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 + def to_a; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#103 + def to_h; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 + def to_s; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 + def values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#63 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#202 + def initialize_copy(original); end + + class << self + # Factory for creating new struct classes. + # + # ``` + # new([class_name] [, member_name]+>) -> StructClass click to toggle source + # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass + # new(value, ...) -> obj + # StructClass[value, ...] -> obj + # ``` + # + # The first two forms are used to create a new struct subclass `class_name` + # that can contain a value for each member_name . This subclass can be + # used to create instances of the structure like any other Class . + # + # If the `class_name` is omitted an anonymous struct class will be created. + # Otherwise, the name of this struct will appear as a constant in the struct class, + # so it must be unique for all structs under this base class and must start with a + # capital letter. Assigning a struct class to a constant also gives the class + # the name of the constant. + # + # If a block is given it will be evaluated in the context of `StructClass`, passing + # the created class as a parameter. This is the recommended way to customize a struct. + # Subclassing an anonymous struct creates an extra anonymous class that will never be used. + # + # The last two forms create a new instance of a struct subclass. The number of value + # parameters must be less than or equal to the number of attributes defined for the + # struct. Unset parameters default to nil. Passing more parameters than number of attributes + # will raise an `ArgumentError`. + # + # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#210 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#220 +Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#8 +class Concurrent::MutexAtomicBoolean + extend ::Concurrent::Synchronization::SafeInitialization + + # Creates a new `AtomicBoolean` with the given initial value. + # + # @param initial [Boolean] the initial value + # @return [MutexAtomicBoolean] a new instance of MutexAtomicBoolean + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#12 + def initialize(initial = T.unsafe(nil)); end + + # Is the current value `false` + # + # @return [Boolean] true if the current value is `false`, else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#34 + def false?; end + + # Explicitly sets the value to false. + # + # @return [Boolean] true if value has changed, otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#44 + def make_false; end + + # Explicitly sets the value to true. + # + # @return [Boolean] true if value has changed, otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#39 + def make_true; end + + # Is the current value `true` + # + # @return [Boolean] true if the current value is `true`, else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#29 + def true?; end + + # Retrieves the current `Boolean` value. + # + # @return [Boolean] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#19 + def value; end + + # Explicitly sets the value. + # + # @param value [Boolean] the new value to be set + # @return [Boolean] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#24 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#51 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#62 + def ns_make_value(value); end +end + +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#9 +class Concurrent::MutexAtomicFixnum + extend ::Concurrent::Synchronization::SafeInitialization + + # Creates a new `AtomicFixnum` with the given initial value. + # + # @param initial [Fixnum] the initial value + # @raise [ArgumentError] if the initial value is not a `Fixnum` + # @return [MutexAtomicFixnum] a new instance of MutexAtomicFixnum + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#13 + def initialize(initial = T.unsafe(nil)); end + + # Atomically sets the value to the given updated value if the current + # value == the expected value. + # + # @param expect [Fixnum] the expected value + # @param update [Fixnum] the new value + # @return [Boolean] true if the value was updated else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#44 + def compare_and_set(expect, update); end + + # Decreases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to decrease the current value + # @return [Fixnum] the current value after decrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 + def decrement(delta = T.unsafe(nil)); end + + # Decreases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to decrease the current value + # @return [Fixnum] the current value after decrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 + def down(delta = T.unsafe(nil)); end + + # Increases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to increase the current value + # @return [Fixnum] the current value after incrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 + def increment(delta = T.unsafe(nil)); end + + # Increases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to increase the current value + # @return [Fixnum] the current value after incrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 + def up(delta = T.unsafe(nil)); end + + # Pass the current value to the given block, replacing it + # with the block's result. May retry if the value changes + # during the block's execution. + # + # @return [Object] the new value + # @yield [Object] Calculate a new value for the atomic reference using + # given (old) value + # @yieldparam old_value [Object] the starting value of the atomic reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#56 + def update; end + + # Retrieves the current `Fixnum` value. + # + # @return [Fixnum] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#20 + def value; end + + # Explicitly sets the value. + # + # @param value [Fixnum] the new value to be set + # @raise [ArgumentError] if the new value is not a `Fixnum` + # @return [Fixnum] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#25 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#65 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#76 + def ns_set(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#9 +class Concurrent::MutexAtomicReference + include ::Concurrent::AtomicDirectUpdate + include ::Concurrent::AtomicNumericCompareAndSetWrapper + extend ::Concurrent::Synchronization::SafeInitialization + + # @param value [Object] The initial value. + # @return [MutexAtomicReference] a new instance of MutexAtomicReference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#16 + def initialize(value = T.unsafe(nil)); end + + # Atomically sets the value to the given updated value if + # the current value == the expected value. + # + # that the actual value was not equal to the expected value. + # + # @param old_value [Object] the expected value + # @param new_value [Object] the new value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#45 + def _compare_and_set(old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 + def compare_and_swap(old_value, new_value); end + + # Gets the current value. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 + def get; end + + # Atomically sets to the given value and returns the old value. + # + # @param new_value [Object] the new value + # @return [Object] the old value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 + def get_and_set(new_value); end + + # Sets to the given value. + # + # @param new_value [Object] the new value + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 + def set(new_value); end + + # Atomically sets to the given value and returns the old value. + # + # @param new_value [Object] the new value + # @return [Object] the old value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 + def swap(new_value); end + + # Gets the current value. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 + def value; end + + # Sets to the given value. + # + # @param new_value [Object] the new value + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 + def value=(new_value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#59 + def synchronize; end +end + +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#9 +class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableObject + # Create a new `CountDownLatch` with the initial `count`. + # + # @param count [new] the initial count + # @raise [ArgumentError] if `count` is not an integer or is less than zero + # @return [MutexCountDownLatch] a new instance of MutexCountDownLatch + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#12 + def initialize(count = T.unsafe(nil)); end + + # The current value of the counter. + # + # @return [Fixnum] the current value of the counter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#34 + def count; end + + # Signal the latch to decrement the counter. Will signal all blocked threads when + # the `count` reaches zero. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#26 + def count_down; end + + # Block on the latch until the counter reaches zero or until `timeout` is reached. + # + # @param timeout [Fixnum] the number of seconds to wait for the counter or `nil` + # to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#21 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#40 + def ns_initialize(count); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#9 +class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject + # @return [MutexSemaphore] a new instance of MutexSemaphore + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#12 + def initialize(count); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#20 + def acquire(permits = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#38 + def available_permits; end + + # Acquires and returns all permits that are immediately available. + # + # @return [Integer] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#47 + def drain_permits; end + + # Shrinks the number of available permits by the indicated reduction. + # + # @param reduction [Fixnum] Number of permits to remove. + # @raise [ArgumentError] if `reduction` is not an integer or is negative + # @raise [ArgumentError] if `@free` - `@reduction` is less than zero + # @return [nil] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#99 + def reduce_permits(reduction); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#77 + def release(permits = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#54 + def try_acquire(permits = T.unsafe(nil), timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#110 + def ns_initialize(count); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#117 + def try_acquire_now(permits); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#127 + def try_acquire_timed(permits, timeout); end +end + +# Various classes within allows for +nil+ values to be stored, +# so a special +NULL+ token is required to indicate the "nil-ness". +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#6 +Concurrent::NULL = T.let(T.unsafe(nil), Object) + +# Suppresses all output when used for logging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#103 +Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#6 +module Concurrent::Options + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#27 + def executor(executor_identifier); end + + # Get the requested `Executor` based on the values set in the options hash. + # + # @option opts + # @param opts [Hash] the options defining the requested executor + # @return [Executor, nil] the requested thread pool, or nil when no option specified + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#19 + def executor_from_options(opts = T.unsafe(nil)); end + end +end + +# Promises are inspired by the JavaScript [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) +# and [Promises/A+](http://promises-aplus.github.io/promises-spec/) specifications. +# +# > A promise represents the eventual value returned from the single +# > completion of an operation. +# +# Promises are similar to futures and share many of the same behaviours. +# Promises are far more robust, however. Promises can be chained in a tree +# structure where each promise may have zero or more children. Promises are +# chained using the `then` method. The result of a call to `then` is always +# another promise. Promises are resolved asynchronously (with respect to the +# main thread) but in a strict order: parents are guaranteed to be resolved +# before their children, children before their younger siblings. The `then` +# method takes two parameters: an optional block to be executed upon parent +# resolution and an optional callable to be executed upon parent failure. The +# result of each promise is passed to each of its children upon resolution. +# When a promise is rejected all its children will be summarily rejected and +# will receive the reason. +# +# Promises have several possible states: *:unscheduled*, *:pending*, +# *:processing*, *:rejected*, or *:fulfilled*. These are also aggregated as +# `#incomplete?` and `#complete?`. When a Promise is created it is set to +# *:unscheduled*. Once the `#execute` method is called the state becomes +# *:pending*. Once a job is pulled from the thread pool's queue and is given +# to a thread for processing (often immediately upon `#post`) the state +# becomes *:processing*. The future will remain in this state until processing +# is complete. A future that is in the *:unscheduled*, *:pending*, or +# *:processing* is considered `#incomplete?`. A `#complete?` Promise is either +# *:rejected*, indicating that an exception was thrown during processing, or +# *:fulfilled*, indicating success. If a Promise is *:fulfilled* its `#value` +# will be updated to reflect the result of the operation. If *:rejected* the +# `reason` will be updated with a reference to the thrown exception. The +# predicate methods `#unscheduled?`, `#pending?`, `#rejected?`, and +# `#fulfilled?` can be called at any time to obtain the state of the Promise, +# as can the `#state` method, which returns a symbol. +# +# Retrieving the value of a promise is done through the `value` (alias: +# `deref`) method. Obtaining the value of a promise is a potentially blocking +# operation. When a promise is *rejected* a call to `value` will return `nil` +# immediately. When a promise is *fulfilled* a call to `value` will +# immediately return the current value. When a promise is *pending* a call to +# `value` will block until the promise is either *rejected* or *fulfilled*. A +# *timeout* value can be passed to `value` to limit how long the call will +# block. If `nil` the call will block indefinitely. If `0` the call will not +# block. Any other integer or float value will indicate the maximum number of +# seconds to block. +# +# Promises run on the global thread pool. +# +# ### Examples +# +# Start by requiring promises +# +# ```ruby +# require 'concurrent/promise' +# ``` +# +# Then create one +# +# ```ruby +# p = Concurrent::Promise.execute do +# # do something +# 42 +# end +# ``` +# +# Promises can be chained using the `then` method. The `then` method accepts a +# block and an executor, to be executed on fulfillment, and a callable argument to be executed +# on rejection. The result of the each promise is passed as the block argument +# to chained promises. +# +# ```ruby +# p = Concurrent::Promise.new{10}.then{|x| x * 2}.then{|result| result - 10 }.execute +# ``` +# +# And so on, and so on, and so on... +# +# ```ruby +# p = Concurrent::Promise.fulfill(20). +# then{|result| result - 10 }. +# then{|result| result * 3 }. +# then(executor: different_executor){|result| result % 5 }.execute +# ``` +# +# The initial state of a newly created Promise depends on the state of its parent: +# - if parent is *unscheduled* the child will be *unscheduled* +# - if parent is *pending* the child will be *pending* +# - if parent is *fulfilled* the child will be *pending* +# - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*) +# +# Promises are executed asynchronously from the main thread. By the time a +# child Promise finishes intialization it may be in a different state than its +# parent (by the time a child is created its parent may have completed +# execution and changed state). Despite being asynchronous, however, the order +# of execution of Promise objects in a chain (or tree) is strictly defined. +# +# There are multiple ways to create and execute a new `Promise`. Both ways +# provide identical behavior: +# +# ```ruby +# # create, operate, then execute +# p1 = Concurrent::Promise.new{ "Hello World!" } +# p1.state #=> :unscheduled +# p1.execute +# +# # create and immediately execute +# p2 = Concurrent::Promise.new{ "Hello World!" }.execute +# +# # execute during creation +# p3 = Concurrent::Promise.execute{ "Hello World!" } +# ``` +# +# Once the `execute` method is called a `Promise` becomes `pending`: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# p.state #=> :pending +# p.pending? #=> true +# ``` +# +# Wait a little bit, and the promise will resolve and provide a value: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# sleep(0.1) +# +# p.state #=> :fulfilled +# p.fulfilled? #=> true +# p.value #=> "Hello, world!" +# ``` +# +# If an exception occurs, the promise will be rejected and will provide +# a reason for the rejection: +# +# ```ruby +# p = Concurrent::Promise.execute{ raise StandardError.new("Here comes the Boom!") } +# sleep(0.1) +# +# p.state #=> :rejected +# p.rejected? #=> true +# p.reason #=> "#" +# ``` +# +# #### Rejection +# +# When a promise is rejected all its children will be rejected and will +# receive the rejection `reason` as the rejection callable parameter: +# +# ```ruby +# p = Concurrent::Promise.execute { Thread.pass; raise StandardError } +# +# c1 = p.then(-> reason { 42 }) +# c2 = p.then(-> reason { raise 'Boom!' }) +# +# c1.wait.state #=> :fulfilled +# c1.value #=> 45 +# c2.wait.state #=> :rejected +# c2.reason #=> # +# ``` +# +# Once a promise is rejected it will continue to accept children that will +# receive immediately rejection (they will be executed asynchronously). +# +# #### Aliases +# +# The `then` method is the most generic alias: it accepts a block to be +# executed upon parent fulfillment and a callable to be executed upon parent +# rejection. At least one of them should be passed. The default block is `{ +# |result| result }` that fulfills the child with the parent value. The +# default callable is `{ |reason| raise reason }` that rejects the child with +# the parent reason. +# +# - `on_success { |result| ... }` is the same as `then {|result| ... }` +# - `rescue { |reason| ... }` is the same as `then(Proc.new { |reason| ... } )` +# - `rescue` is aliased by `catch` and `on_error` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#190 +class Concurrent::Promise < ::Concurrent::IVar + # Initialize a new Promise with the provided options. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] a new instance of Promise + # @see http://wiki.commonjs.org/wiki/Promises/A + # @see http://promises-aplus.github.io/promises-spec/ + # @yield The block operation to be performed asynchronously. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#210 + def initialize(opts = T.unsafe(nil), &block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 + def catch(&block); end + + # Execute an `:unscheduled` `Promise`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Promise` is in any state other than `:unscheduled`. + # + # @return [Promise] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#246 + def execute; end + + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param reason [Object] for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # @return [IVar] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#278 + def fail(reason = T.unsafe(nil)); end + + # Yield the successful result to the block that returns a promise. If that + # promise is also successful the result is the result of the yielded promise. + # If either part fails the whole also fails. + # + # @example + # Promise.execute { 1 }.flat_map { |v| Promise.execute { v + 2 } }.value! #=> 3 + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#375 + def flat_map(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 + def on_error(&block); end + + # Chain onto this promise an action to be undertaken on success + # (fulfillment). + # + # @raise [ArgumentError] + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#349 + def on_success(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 + def rescue(&block); end + + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # @return [IVar] self + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#262 + def set(value = T.unsafe(nil), &block); end + + # Chain a new promise off the current promise. + # + # @overload then + # @overload then + # @raise [ArgumentError] + # @return [Promise] the new promise + # @yield The block operation to be performed asynchronously. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#314 + def then(*args, &block); end + + # Builds a promise that produces the result of self and others in an Array + # and fails if any of them fails. + # + # @overload zip + # @overload zip + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#440 + def zip(*others); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#551 + def complete(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#545 + def notify_child(child); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#481 + def ns_initialize(value, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#533 + def on_fulfill(result); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#539 + def on_reject(reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#562 + def realize(task); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#528 + def root?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#520 + def set_pending; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#570 + def set_state!(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#576 + def synchronized_set_state!(success, value, reason); end + + class << self + # Aggregate a collection of zero or more promises under a composite promise, + # execute the aggregated promises and collect them into a standard Ruby array, + # call the given Ruby `Ennnumerable` predicate (such as `any?`, `all?`, `none?`, + # or `one?`) on the collection checking for the success or failure of each, + # then executing the composite's `#then` handlers if the predicate returns + # `true` or executing the composite's `#rescue` handlers if the predicate + # returns false. + # + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param promises [Array] Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#505 + def aggregate(method, *promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if all aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#464 + def all?(*promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if any aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param promises [Array] Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#475 + def any?(*promises); end + + # Create a new `Promise` object with the given block, execute it, and return the + # `:pending` object. + # + # @example + # promise = Concurrent::Promise.execute{ sleep(1); 42 } + # promise.state #=> :pending + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` in the `:pending` state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#296 + def execute(opts = T.unsafe(nil), &block); end + + # Create a new `Promise` and fulfill it immediately. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#224 + def fulfill(value, opts = T.unsafe(nil)); end + + # Create a new `Promise` and reject it immediately. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#237 + def reject(reason, opts = T.unsafe(nil)); end + + # Builds a promise that produces the result of promises in an Array + # and fails if any of them fails. + # + # @overload zip + # @overload zip + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#409 + def zip(*promises); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#11 +class Concurrent::PromiseExecutionError < ::StandardError; end + +# {include:file:docs-source/promises-main.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#12 +module Concurrent::Promises + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2037 +class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end + +# Common ancestor of {Event} and {Future} classes, many shared methods are defined here. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#512 +class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AbstractEventFuture] a new instance of AbstractEventFuture + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#521 + def initialize(promise, default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#737 + def add_callback_clear_delayed_node(node); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#732 + def add_callback_notify_blocked(promise, index); end + + # For inspection. + # + # @return [Array] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#701 + def blocks; end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#709 + def callbacks; end + + # Shortcut of {#chain_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #chain_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#595 + def chain(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it is resolved. + # + # @overload an_event.chain_on + # @overload a_future.chain_on + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [Future] + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#613 + def chain_on(executor, *args, &task); end + + # Resolves the resolvable when receiver is resolved. + # + # @param resolvable [Resolvable] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#628 + def chain_resolvable(resolvable); end + + # Returns default executor. + # + # @return [Executor] default executor + # @see #with_default_executor + # @see FactoryMethods#future_on + # @see FactoryMethods#resolvable_future + # @see FactoryMethods#any_fulfilled_future_on + # @see similar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#589 + def default_executor; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#618 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def internal_state; end + + # Shortcut of {#on_resolution_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_resolution_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#636 + def on_resolution(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # resolved. + # + # @overload an_event.on_resolution! + # @overload a_future.on_resolution! + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#654 + def on_resolution!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is resolved. + # + # @overload an_event.on_resolution_using + # @overload a_future.on_resolution_using + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#672 + def on_resolution_using(executor, *args, &callback); end + + # Is it in pending state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#548 + def pending?; end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#715 + def promise; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#687 + def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Is it in resolved state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#554 + def resolved?; end + + # Returns its state. + # + # @overload an_event.state + # @overload a_future.state + # @return [Symbol] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#542 + def state; end + + # Resolves the resolvable when receiver is resolved. + # + # @param resolvable [Resolvable] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#628 + def tangle(resolvable); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#618 + def to_s; end + + # Propagates touch. Requests all the delayed futures, which it depends on, to be + # executed. This method is called by any other method requiring resolved state, like {#wait}. + # + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#561 + def touch; end + + # For inspection. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#721 + def touched?; end + + # Wait (block the Thread) until receiver is {#resolved?}. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#577 + def wait(timeout = T.unsafe(nil)); end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#727 + def waiting_threads; end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @abstract + # @raise [NotImplementedError] + # @return [AbstractEventFuture] + # @see Event#with_default_executor + # @see Future#with_default_executor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#682 + def with_default_executor(executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#742 + def with_hidden_resolvable; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#749 + def add_callback(method, *args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#802 + def async_callback_on_resolution(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#786 + def call_callback(method, state, args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#790 + def call_callbacks(state); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#762 + def callback_clear_delayed_node(state, node); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#808 + def callback_notify_blocked(state, promise, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_internal_state(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def internal_state=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_internal_state(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_internal_state(&block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#767 + def wait_until_resolved(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#798 + def with_async(executor, *args, &block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1786 +class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise + # @return [AbstractFlatPromise] a new instance of AbstractFlatPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1788 + def initialize(delayed_because, blockers_count, event_or_future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1798 + def touch; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1818 + def add_delayed_of(future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1810 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1814 + def resolvable?(countdown, future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1806 + def touched?; end +end + +# @abstract +# @private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1539 +class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AbstractPromise] a new instance of AbstractPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1543 + def initialize(future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1554 + def default_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1571 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1548 + def event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1548 + def future; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1565 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 + def state; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1565 + def to_s; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1562 + def touch; end + + private + + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1582 + def evaluate_to(*args, block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1577 + def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2074 +class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2078 + def resolvable?(countdown, event_or_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2040 +class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise + # @return [AnyResolvedEventPromise] a new instance of AnyResolvedEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2044 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2052 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2048 + def resolvable?(countdown, future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2057 +class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise + # @return [AnyResolvedFuturePromise] a new instance of AnyResolvedFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2061 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2069 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2065 + def resolvable?(countdown, future, index); end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1609 +class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise + # @return [BlockedPromise] a new instance of BlockedPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1651 + def initialize(delayed, blockers_count, future); end + + # for inspection only + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1673 + def blocked_by; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1664 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1657 + def on_blocker_resolution(future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1668 + def touch; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1681 + def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1700 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1696 + def process_on_blocker_resolution(future, index); end + + # @return [true, false] if resolvable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1692 + def resolvable?(countdown, future, index); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1642 + def add_delayed(delayed1, delayed2); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1635 + def new_blocked_by(blockers, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1613 + def new_blocked_by1(blocker, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1620 + def new_blocked_by2(blocker1, blocker2, *args, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end + end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1706 +class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise + # @raise [ArgumentError] + # @return [BlockedTaskPromise] a new instance of BlockedTaskPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1707 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1715 + def executor; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1756 +class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1759 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2085 +class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise + # @return [DelayPromise] a new instance of DelayPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2087 + def initialize(default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2098 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2094 + def touch; end +end + +# Represents an event which will happen in future (will be resolved). The event is either +# pending or resolved. It should be always resolved. Use {Future} to communicate rejections and +# cancellation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#816 +class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#829 + def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#843 + def any(event_or_future); end + + # Creates new event dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 + def delay; end + + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#865 + def schedule(intended_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#595 + def then(*args, &task); end + + # Returns self, since this is event + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#883 + def to_event; end + + # Converts event to a future. The future is fulfilled when the event is resolved, the future may never fail. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#875 + def to_future; end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#889 + def with_default_executor(executor); end + + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#829 + def zip(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#843 + def |(event_or_future); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#900 + def callback_on_resolution(state, args, callback); end + + # @raise [Concurrent::MultipleAssignmentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#895 + def rejected_resolution(raise_on_reassign, state); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1962 +class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise + # @return [EventWrapperPromise] a new instance of EventWrapperPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1963 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1969 + def on_resolvable(resolved_future, index); end +end + +# Container of all {Future}, {Event} factory methods. They are never constructed directly with +# new. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#45 +module Concurrent::Promises::FactoryMethods + include ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::ReInclude + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods + + # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_resolved_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#277 + def any(*futures_and_or_events); end + + # Shortcut of {#any_event_on} with default `:io` executor supplied. + # + # @return [Event] + # @see #any_event_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#318 + def any_event(*futures_and_or_events); end + + # Creates new event which becomes resolved after first of the futures_and_or_events resolves. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#328 + def any_event_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#any_fulfilled_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_fulfilled_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#299 + def any_fulfilled_future(*futures_and_or_events); end + + # Creates new future which is resolved after first of futures_and_or_events is fulfilled. + # Its result equals result of the first resolved future or if all futures_and_or_events reject, + # it has reason of the last resolved future. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#312 + def any_fulfilled_future_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_resolved_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#277 + def any_resolved_future(*futures_and_or_events); end + + # Creates new future which is resolved after first futures_and_or_events is resolved. + # Its result equals result of the first resolved future. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#293 + def any_resolved_future_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#delay_on} with default `:io` executor supplied. + # + # @return [Future, Event] + # @see #delay_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#189 + def delay(*args, &task); end + + # Creates new event or future which is resolved only after it is touched, + # see {Concurrent::AbstractEventFuture#touch}. + # + # @overload delay_on + # @overload delay_on + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#206 + def delay_on(default_executor, *args, &task); end + + # Creates resolved future with will be fulfilled with the given value. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param value [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#126 + def fulfilled_future(value, default_executor = T.unsafe(nil)); end + + # Shortcut of {#future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#93 + def future(*args, &task); end + + # Constructs new Future which will be resolved after block is evaluated on default executor. + # Evaluation begins immediately. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [Future] + # @yield [*args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#105 + def future_on(default_executor, *args, &task); end + + # General constructor. Behaves differently based on the argument's type. It's provided for convenience + # but it's better to be explicit. + # + # @overload make_future + # @overload make_future + # @overload make_future + # @overload make_future + # @overload make_future + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Event, Future] + # @see rejected_future, resolved_event, fulfilled_future + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#173 + def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end + + # Creates resolved future with will be rejected with the given reason. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param reason [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#135 + def rejected_future(reason, default_executor = T.unsafe(nil)); end + + # Shortcut of {#resolvable_event_on} with default `:io` executor supplied. + # + # @return [ResolvableEvent] + # @see #resolvable_event_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#62 + def resolvable_event; end + + # Created resolvable event, user is responsible for resolving the event once by + # {Promises::ResolvableEvent#resolve}. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [ResolvableEvent] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#71 + def resolvable_event_on(default_executor = T.unsafe(nil)); end + + # Shortcut of {#resolvable_future_on} with default `:io` executor supplied. + # + # @return [ResolvableFuture] + # @see #resolvable_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#77 + def resolvable_future; end + + # Creates resolvable future, user is responsible for resolving the future once by + # {Promises::ResolvableFuture#resolve}, {Promises::ResolvableFuture#fulfill}, + # or {Promises::ResolvableFuture#reject} + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [ResolvableFuture] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#87 + def resolvable_future_on(default_executor = T.unsafe(nil)); end + + # Creates resolved event. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#143 + def resolved_event(default_executor = T.unsafe(nil)); end + + # Creates resolved future with will be either fulfilled with the given value or rejection with + # the given reason. + # + # @param fulfilled [true, false] + # @param value [Object] + # @param reason [Object] + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#117 + def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end + + # Shortcut of {#schedule_on} with default `:io` executor supplied. + # + # @return [Future, Event] + # @see #schedule_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#213 + def schedule(intended_time, *args, &task); end + + # Creates new event or future which is resolved in intended_time. + # + # @overload schedule_on + # @overload schedule_on + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#232 + def schedule_on(default_executor, intended_time, *args, &task); end + + # Shortcut of {#zip_futures_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #zip_futures_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#239 + def zip(*futures_and_or_events); end + + # Shortcut of {#zip_events_on} with default `:io` executor supplied. + # + # @return [Event] + # @see #zip_events_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#261 + def zip_events(*futures_and_or_events); end + + # Creates new event which is resolved after all futures_and_or_events are resolved. + # (Future is resolved when fulfilled or rejected.) + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#271 + def zip_events_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#zip_futures_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #zip_futures_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#239 + def zip_futures(*futures_and_or_events); end + + # Creates new future which is resolved after all futures_and_or_events are resolved. + # Its value is array of zipped future values. Its reason is array of reasons for rejection. + # If there is an error it rejects. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#253 + def zip_futures_on(default_executor, *futures_and_or_events); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#49 +module Concurrent::Promises::FactoryMethods::Configuration + # @return [Executor, :io, :fast] the executor which is used when none is supplied + # to a factory method. The method can be overridden in the receivers of + # `include FactoryMethod` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#53 + def default_executor; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1830 +class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise + # @return [FlatEventPromise] a new instance of FlatEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1834 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1838 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1863 +class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # @raise [ArgumentError] + # @return [FlatFuturePromise] a new instance of FlatFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1867 + def initialize(delayed, blockers_count, levels, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1874 + def process_on_blocker_resolution(future, index); end +end + +# Represents a value which will become available in future. May reject with a reason instead, +# e.g. when the tasks raises an exception. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#907 +class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1060 + def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1075 + def any(event_or_future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1205 + def apply(args, block); end + + # Creates new future dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 + def delay; end + + # Allows rejected Future to be risen with `raise` method. + # If the reason is not an exception `Runtime.new(reason)` is returned. + # + # @example + # raise Promises.rejected_future(StandardError.new("boom")) + # raise Promises.rejected_future("or just boom") + # @raise [Concurrent::Error] when raising not rejected future + # @return [Exception] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1003 + def exception(*args); end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param level [Integer] how many levels of futures should flatten + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1110 + def flat(level = T.unsafe(nil)); end + + # Creates new event which will be resolved when the returned event by receiver is. + # Be careful if the receiver rejects it will just resolve since Event does not hold reason. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 + def flat_event; end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param level [Integer] how many levels of futures should flatten + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1110 + def flat_future(level = T.unsafe(nil)); end + + # Is it in fulfilled state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#911 + def fulfilled?; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1225 + def inspect; end + + # Shortcut of {#on_fulfillment_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_fulfillment_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1126 + def on_fulfillment(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # fulfilled. Does nothing on rejection. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yield [value, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1137 + def on_fulfillment!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # fulfilled. Does nothing on rejection. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yield [value, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1149 + def on_fulfillment_using(executor, *args, &callback); end + + # Shortcut of {#on_rejection_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_rejection_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1155 + def on_rejection(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # rejected. Does nothing on fulfillment. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yield [reason, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1166 + def on_rejection!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # rejected. Does nothing on fulfillment. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [self] + # @yield [reason, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1178 + def on_rejection_using(executor, *args, &callback); end + + # Returns reason of future's rejection. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#956 + def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Is it in rejected state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#918 + def rejected?; end + + # Shortcut of {#rescue_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #rescue_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1042 + def rescue(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it rejects. Does not run + # the task if it fulfills. It will resolve though, triggering any dependent futures. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [Future] + # @yield [reason, *args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1054 + def rescue_on(executor, *args, &task); end + + # Returns triplet fulfilled?, value, reason. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil + # on timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#971 + def result(timeout = T.unsafe(nil)); end + + # Allows to use futures as green threads. The receiver has to evaluate to a future which + # represents what should be done next. It basically flattens indefinitely until non Future + # values is returned which becomes result of the returned future. Any encountered exception + # will become reason of the returned future. + # + # @example + # body = lambda do |v| + # v += 1 + # v < 5 ? Promises.future(v, &body) : v + # end + # Promises.future(0, &body).run.value! # => 5 + # @param run_test [#call(value)] an object which when called returns either Future to keep running with + # or nil, then the run completes with the value. + # The run_test can be used to extract the Future from deeper structure, + # or to distinguish Future which is a resulting value from a future + # which is suppose to continue running. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1200 + def run(run_test = T.unsafe(nil)); end + + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1092 + def schedule(intended_time); end + + # Shortcut of {#then_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #then_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1024 + def then(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it fulfills. Does not run + # the task if it rejects. It will resolve though, triggering any dependent futures. + # + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yeild section). + # @return [Future] + # @yield [value, *args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1036 + def then_on(executor, *args, &task); end + + # Converts future to event which is resolved when future is resolved by fulfillment or rejection. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1212 + def to_event; end + + # Returns self, since this is a future + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1220 + def to_future; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1225 + def to_s; end + + # Return value of the future. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # timeout_value on timeout, + # nil on rejection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#940 + def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Return value of the future. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @raise [Exception] {#reason} on rejection + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # or nil on rejection, + # or timeout_value on timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#987 + def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Wait (block the Thread) until receiver is {#resolved?}. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @raise [Exception] {#reason} on rejection + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#977 + def wait!(timeout = T.unsafe(nil)); end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1101 + def with_default_executor(executor); end + + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1060 + def zip(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1075 + def |(event_or_future); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1262 + def async_callback_on_fulfillment(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1268 + def async_callback_on_rejection(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1274 + def callback_on_fulfillment(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1278 + def callback_on_rejection(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1282 + def callback_on_resolution(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1241 + def rejected_resolution(raise_on_reassign, state); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1237 + def run_test(v); end + + # @raise [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1256 + def wait_until_resolved!(timeout = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1974 +class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise + # @return [FutureWrapperPromise] a new instance of FutureWrapperPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1975 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1981 + def on_resolvable(resolved_future, index); end +end + +# will be immediately resolved +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1773 +class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise + # @return [ImmediateEventPromise] a new instance of ImmediateEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1774 + def initialize(default_executor); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1779 +class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise + # @return [ImmediateFuturePromise] a new instance of ImmediateFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1780 + def initialize(default_executor, fulfilled, value, reason); end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1605 +class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#337 +module Concurrent::Promises::InternalStates; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#396 +class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [Fulfilled] a new instance of Fulfilled + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#398 + def initialize(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#406 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#402 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#414 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#418 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#410 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#424 +class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#425 + def apply(args, block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#487 +Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#458 +class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [PartiallyRejected] a new instance of PartiallyRejected + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#459 + def initialize(value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#481 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#465 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#477 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#469 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#473 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#350 +class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#351 + def resolved?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#355 + def to_sym; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#489 +Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#491 +Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#431 +class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [Rejected] a new instance of Rejected + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#432 + def initialize(reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#452 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#436 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#444 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#448 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#440 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#361 +class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#365 +class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#390 + def apply; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#378 + def fulfilled?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#386 + def reason; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#366 + def resolved?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#374 + def result; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#370 + def to_sym; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#382 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#339 +class Concurrent::Promises::InternalStates::State + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#340 + def resolved?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#344 + def to_sym; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1738 +class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise + # @return [RescuePromise] a new instance of RescuePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1741 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1745 + def on_resolvable(resolved_future, index); end +end + +# Marker module of Future, Event resolved manually. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1289 +module Concurrent::Promises::Resolvable + include ::Concurrent::Promises::InternalStates +end + +# A Event which can be resolved by user. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1294 +class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event + include ::Concurrent::Promises::Resolvable + + # Makes the event resolved, which triggers all dependent futures. + # + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1314 + def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [true, false] If it times out and the argument is true it will also resolve the event. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1332 + def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new event wrapping receiver, effectively hiding the resolve method. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1321 + def with_hidden_resolvable; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1590 +class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise + # @return [ResolvableEventPromise] a new instance of ResolvableEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1591 + def initialize(default_executor); end +end + +# A Future which can be resolved by user. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1344 +class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future + include ::Concurrent::Promises::Resolvable + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @return [self] + # @yield [*args] to the block. + # @yieldreturn [Object] value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1385 + def evaluate_to(*args, &block); end + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @raise [Exception] also raise reason on rejection. + # @return [self] + # @yield [*args] to the block. + # @yieldreturn [Object] value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1396 + def evaluate_to!(*args, &block); end + + # Makes the future fulfilled with `value`, + # which triggers all dependent futures. + # + # @param value [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1365 + def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#reason} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [Exception, timeout_value, nil] + # @see Future#reason + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1493 + def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Makes the future rejected with `reason`, + # which triggers all dependent futures. + # + # @param reason [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1375 + def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, + # which triggers all dependent futures. + # + # @param fulfilled [true, false] + # @param value [Object] + # @param reason [Object] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1355 + def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#result} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [::Array(Boolean, Object, Exception), nil] + # @see Future#result + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1514 + def result(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [Object, timeout_value, nil] + # @see Future#value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1449 + def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value!} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @raise [Exception] {#reason} on rejection + # @return [Object, timeout_value, nil] + # @see Future#value! + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1471 + def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1411 + def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#wait!} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @raise [Exception] {#reason} on rejection + # @return [self, true, false] + # @see Future#wait! + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1428 + def wait!(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new future wrapping receiver, effectively hiding the resolve method and similar. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1532 + def with_hidden_resolvable; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1596 +class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise + # @return [ResolvableFuturePromise] a new instance of ResolvableFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1597 + def initialize(default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1582 + def evaluate_to(*args, block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1899 +class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # @return [RunFuturePromise] a new instance of RunFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1903 + def initialize(delayed, blockers_count, default_executor, run_test); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1908 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2104 +class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise + # @return [ScheduledPromise] a new instance of ScheduledPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2115 + def initialize(default_executor, intended_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2109 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2105 + def intended_time; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1720 +class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise + # @return [ThenPromise] a new instance of ThenPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1723 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1727 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1930 +class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipEventEventPromise] a new instance of ZipEventEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1931 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1937 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2021 +class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipEventsPromise] a new instance of ZipEventsPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2025 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2031 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1942 +class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipFutureEventPromise] a new instance of ZipFutureEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1943 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1957 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1950 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1986 +class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipFuturesPromise] a new instance of ZipFuturesPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1990 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2003 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1997 + def process_on_blocker_resolution(future, index); end +end + +# Methods form module A included to a module B, which is already included into class C, +# will not be visible in the C class. If this module is extended to B then A's methods +# are correctly made visible to C. +# +# @example +# module A +# def a +# :a +# end +# end +# +# module B1 +# end +# +# class C1 +# include B1 +# end +# +# module B2 +# extend Concurrent::ReInclude +# end +# +# class C2 +# include B2 +# end +# +# B1.send :include, A +# B2.send :include, A +# +# C1.new.respond_to? :a # => false +# C2.new.respond_to? :a # => true +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#36 +module Concurrent::ReInclude + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#44 + def extended(base); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#50 + def include(*modules); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#38 + def included(base); end +end + +# Ruby read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And if the "write" lock is taken, any readers who come along will have to wait) +# +# If readers are already active when a writer comes along, the writer will wait for +# all the readers to finish before going ahead. +# Any additional readers that come when the writer is already waiting, will also +# wait (so writers are not starved). +# +# This implementation is based on `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# @note Do **not** try to acquire the write lock while already holding a read lock +# **or** try to acquire the write lock while you already have it. +# This will lead to deadlock +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#31 +class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `ReadWriteLock` in the unlocked state. + # + # @return [ReadWriteLock] a new instance of ReadWriteLock + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#59 + def initialize; end + + # Acquire a read lock. If a write lock has been acquired will block until + # it is released. Will not block if other read locks have been acquired. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#111 + def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#160 + def acquire_write_lock; end + + # Queries whether any threads are waiting to acquire the read or write lock. + # + # @return [Boolean] true if any threads are waiting for a lock else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#214 + def has_waiters?; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#140 + def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#196 + def release_write_lock; end + + # Execute a block operation within a read lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#75 + def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#94 + def with_write_lock; end + + # Queries if the write lock is held by any thread. + # + # @return [Boolean] true if the write lock is held else false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#207 + def write_locked?; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#246 + def max_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#251 + def max_writers?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#221 + def running_readers(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#226 + def running_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#231 + def running_writer?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#241 + def waiting_writer?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#236 + def waiting_writers(c = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#40 +Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#43 +Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#37 +Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#34 +Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# Re-entrant read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And while the "write" lock is taken, no read locks can be obtained either. +# Hence, the write lock can also be called an "exclusive" lock.) +# +# If another thread has taken a read lock, any thread which wants a write lock +# will block until all the readers release their locks. However, once a thread +# starts waiting to obtain a write lock, any additional readers that come along +# will also wait (so writers are not starved). +# +# A thread can acquire both a read and write lock at the same time. A thread can +# also acquire a read lock OR a write lock more than once. Only when the read (or +# write) lock is released as many times as it was acquired, will the thread +# actually let it go, allowing other threads which might have been waiting +# to proceed. Therefore the lock can be upgraded by first acquiring +# read lock and then write lock and that the lock can be downgraded by first +# having both read and write lock a releasing just the write lock. +# +# If both read and write locks are acquired by the same thread, it is not strictly +# necessary to release them in the same order they were acquired. In other words, +# the following code is legal: +# +# This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.acquire_write_lock +# lock.acquire_read_lock +# lock.release_write_lock +# # At this point, the current thread is holding only a read lock, not a write +# # lock. So other threads can take read locks, but not a write lock. +# lock.release_read_lock +# # Now the current thread is not holding either a read or write lock, so +# # another thread could potentially acquire a write lock. +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#53 +class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `ReentrantReadWriteLock` in the unlocked state. + # + # @return [ReentrantReadWriteLock] a new instance of ReentrantReadWriteLock + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#109 + def initialize; end + + # Acquire a read lock. If a write lock is held by another thread, will block + # until it is released. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#162 + def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#257 + def acquire_write_lock; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#236 + def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#329 + def release_write_lock; end + + # Try to acquire a read lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#215 + def try_read_lock; end + + # Try to acquire a write lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#310 + def try_write_lock; end + + # Execute a block operation within a read lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#126 + def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#145 + def with_write_lock; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#370 + def max_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#375 + def max_writers?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#345 + def running_readers(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#350 + def running_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#355 + def running_writer?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#365 + def waiting_or_running_writer?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#360 + def waiting_writers(c = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#94 +Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#96 +Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#84 +Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#102 +Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#92 +Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# Used with @Counter: +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#90 +Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#86 +Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) + +# Used with @HeldCount: +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#100 +Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#104 +Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# Raised by an `Executor` when it is unable to process a given task, +# possibly because of a reject policy or other internal error. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#48 +class Concurrent::RejectedExecutionError < ::Concurrent::Error; end + +# Raised when any finite resource, such as a lock counter, exceeds its +# maximum limit/threshold. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#52 +class Concurrent::ResourceLimitError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#129 +class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [RubyExchanger] a new instance of RubyExchanger + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#159 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_slot(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def slot; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def slot=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_slot(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_slot(&block); end + + private + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param value [Object] the value to exchange with another thread + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#170 + def do_exchange(value, timeout); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#138 +class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [Node] a new instance of Node + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#142 + def initialize(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#137 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#105 + def compare_and_set_value(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#153 + def item; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#149 + def latch; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#101 + def swap_value(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#109 + def update_value(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#93 + def value; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#97 + def value=(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#8 +class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService + # @return [RubyExecutorService] a new instance of RubyExecutorService + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#11 + def initialize(*args, &block); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#42 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 + def post(*args, &task); end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#33 + def shutdown; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#52 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#70 + def ns_running?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#78 + def ns_shutdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#66 + def ns_shutdown_execution; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#74 + def ns_shuttingdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#58 + def stop_event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#62 + def stopped_event; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#8 +class Concurrent::RubySingleThreadExecutor < ::Concurrent::RubyThreadPoolExecutor + # @return [RubySingleThreadExecutor] a new instance of RubySingleThreadExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#11 + def initialize(opts = T.unsafe(nil)); end +end + +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#12 +class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService + # @return [RubyThreadPoolExecutor] a new instance of RubyThreadPoolExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#45 + def initialize(opts = T.unsafe(nil)); end + + # Does the task queue have a maximum size? + # + # @return [Boolean] True if the task queue has a maximum size else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#65 + def can_overflow?; end + + # The number of tasks that have been completed by the pool since construction. + # + # @return [Integer] The number of tasks that have been completed by the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#60 + def completed_task_count; end + + # The number of seconds that a thread may be idle before being reclaimed. + # + # @return [Integer] The number of seconds that a thread may be idle before being reclaimed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#36 + def idletime; end + + # The largest number of threads that have been created in the pool since construction. + # + # @return [Integer] The largest number of threads that have been created in the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#50 + def largest_length; end + + # The number of threads currently in the pool. + # + # @return [Integer] The number of threads currently in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#70 + def length; end + + # The maximum number of threads that may be created in the pool. + # + # @return [Integer] The maximum number of threads that may be created in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#30 + def max_length; end + + # The maximum number of tasks that may be waiting in the work queue at any one time. + # When the queue size reaches `max_queue` subsequent tasks will be rejected in + # accordance with the configured `fallback_policy`. + # + # @return [Integer] The maximum number of tasks that may be waiting in the work queue at any one time. + # When the queue size reaches `max_queue` subsequent tasks will be rejected in + # accordance with the configured `fallback_policy`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#39 + def max_queue; end + + # The minimum number of threads that may be retained in the pool. + # + # @return [Integer] The minimum number of threads that may be retained in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#33 + def min_length; end + + # Prune the thread pool of unneeded threads + # + # What is being pruned is controlled by the min_threads and idletime + # parameters passed at pool creation time + # + # This is a no-op on some pool implementation (e.g. the Java one). The Ruby + # pool will auto-prune each time a new job is posted. You will need to call + # this method explicitely in case your application post jobs in bursts (a + # lot of jobs and then nothing for long periods) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#111 + def prune_pool; end + + # The number of tasks in the queue awaiting execution. + # + # @return [Integer] The number of tasks in the queue awaiting execution. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#75 + def queue_length; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#96 + def ready_worker(worker, last_message); end + + # Number of tasks that may be enqueued before reaching `max_queue` and rejecting + # new tasks. A value of -1 indicates that the queue may grow without bound. + # + # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting + # new tasks. A value of -1 indicates that the queue may grow without bound. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#80 + def remaining_capacity; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#91 + def remove_busy_worker(worker); end + + # The number of tasks that have been scheduled for execution on the pool since construction. + # + # @return [Integer] The number of tasks that have been scheduled for execution on the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#55 + def scheduled_task_count; end + + # Whether or not a value of 0 for :max_queue option means the queue must perform direct hand-off or rather unbounded queue. + # + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#42 + def synchronous; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#101 + def worker_died(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#106 + def worker_task_completed; end + + private + + # creates new worker which has to receive work to do after it's added + # + # @return [nil, Worker] nil of max capacity is reached + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#234 + def ns_add_busy_worker; end + + # tries to assign task to a worker, tries to get one from @ready or to create new one + # + # @return [true, false] if task is assigned to a worker + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#194 + def ns_assign_worker(*args, &task); end + + # tries to enqueue task + # + # @return [true, false] if enqueued + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#212 + def ns_enqueue(*args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#153 + def ns_execute(*args, &task); end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#118 + def ns_initialize(opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#182 + def ns_kill_execution; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#148 + def ns_limited_queue?; end + + # try oldest worker if it is idle for enough time, it's returned back at the start + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#273 + def ns_prune_pool; end + + # handle ready worker, giving it new job or assigning back to @ready + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#246 + def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end + + # removes a worker which is not in not tracked in @ready + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#264 + def ns_remove_busy_worker(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#289 + def ns_reset_if_forked; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#167 + def ns_shutdown_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#224 + def ns_worker_died(worker); end +end + +# Default maximum number of threads that will be created in the pool. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#15 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Default maximum number of tasks that may be added to the task queue. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#21 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) + +# Default minimum number of threads that will be retained in the pool. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#18 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Default value of the :synchronous option. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#27 +Concurrent::RubyThreadPoolExecutor::DEFAULT_SYNCHRONOUS = T.let(T.unsafe(nil), FalseClass) + +# Default maximum number of seconds a thread in the pool may remain idle +# before being reclaimed. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#24 +Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#303 +class Concurrent::RubyThreadPoolExecutor::Worker + include ::Logger::Severity + include ::Concurrent::Concern::Logging + + # @return [Worker] a new instance of Worker + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#306 + def initialize(pool, id); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#317 + def <<(message); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#325 + def kill; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#321 + def stop; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#331 + def create_worker(queue, pool, idletime); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#351 + def run_task(pool, task, args); end +end + +# A simple utility class that executes a callable and returns and array of three elements: +# success - indicating if the callable has been executed without errors +# value - filled by the callable result if it has been executed without errors, nil otherwise +# reason - the error risen by the callable if it has been executed with errors, nil otherwise +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#9 +class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject + # @return [SafeTaskExecutor] a new instance of SafeTaskExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#11 + def initialize(task, opts = T.unsafe(nil)); end + + # @return [Array] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#18 + def execute(*args); end +end + +# `ScheduledTask` is a close relative of `Concurrent::Future` but with one +# important difference: A `Future` is set to execute as soon as possible +# whereas a `ScheduledTask` is set to execute after a specified delay. This +# implementation is loosely based on Java's +# [ScheduledExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html). +# It is a more feature-rich variant of {Concurrent.timer}. +# +# The *intended* schedule time of task execution is set on object construction +# with the `delay` argument. The delay is a numeric (floating point or integer) +# representing a number of seconds in the future. Any other value or a numeric +# equal to or less than zero will result in an exception. The *actual* schedule +# time of task execution is set when the `execute` method is called. +# +# The constructor can also be given zero or more processing options. Currently +# the only supported options are those recognized by the +# [Dereferenceable](Dereferenceable) module. +# +# The final constructor argument is a block representing the task to be performed. +# If no block is given an `ArgumentError` will be raised. +# +# **States** +# +# `ScheduledTask` mixes in the [Obligation](Obligation) module thus giving it +# "future" behavior. This includes the expected lifecycle states. `ScheduledTask` +# has one additional state, however. While the task (block) is being executed the +# state of the object will be `:processing`. This additional state is necessary +# because it has implications for task cancellation. +# +# **Cancellation** +# +# A `:pending` task can be cancelled using the `#cancel` method. A task in any +# other state, including `:processing`, cannot be cancelled. The `#cancel` +# method returns a boolean indicating the success of the cancellation attempt. +# A cancelled `ScheduledTask` cannot be restarted. It is immutable. +# +# **Obligation and Observation** +# +# The result of a `ScheduledTask` can be obtained either synchronously or +# asynchronously. `ScheduledTask` mixes in both the [Obligation](Obligation) +# module and the +# [Observable](http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html) +# module from the Ruby standard library. With one exception `ScheduledTask` +# behaves identically to [Future](Observable) with regard to these modules. +# +# @example Basic usage +# +# require 'concurrent/scheduled_task' +# require 'csv' +# require 'open-uri' +# +# class Ticker +# def get_year_end_closing(symbol, year, api_key) +# uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" +# data = [] +# csv = URI.parse(uri).read +# if csv.include?('call frequency') +# return :rate_limit_exceeded +# end +# CSV.parse(csv, headers: true) do |row| +# data << row['close'].to_f if row['timestamp'].include?(year.to_s) +# end +# year_end = data.first +# year_end +# rescue => e +# p e +# end +# end +# +# api_key = ENV['ALPHAVANTAGE_KEY'] +# abort(error_message) unless api_key +# +# # Future +# price = Concurrent::Future.execute{ Ticker.new.get_year_end_closing('TWTR', 2013, api_key) } +# price.state #=> :pending +# price.pending? #=> true +# price.value(0) #=> nil (does not block) +# +# sleep(1) # do other stuff +# +# price.value #=> 63.65 (after blocking if necessary) +# price.state #=> :fulfilled +# price.fulfilled? #=> true +# price.value #=> 63.65 +# @example Successful task execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.state #=> :unscheduled +# task.execute +# task.state #=> pending +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> true +# task.rejected? #=> false +# task.value #=> 'What does the fox say?' +# @example One line creation and execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' }.execute +# task.state #=> pending +# +# task = Concurrent::ScheduledTask.execute(2){ 'What do you get when you multiply 6 by 9?' } +# task.state #=> pending +# @example Failed task execution +# +# task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> false +# task.rejected? #=> true +# task.value #=> nil +# task.reason #=> # +# @example Task execution with observation +# +# observer = Class.new{ +# def update(time, value, reason) +# puts "The task completed at #{time} with value '#{value}'" +# end +# }.new +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.add_observer(observer) +# task.execute +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# #>> The task completed at 2013-11-07 12:26:09 -0500 with value 'What does the fox say?' +# @see Concurrent.timer +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#158 +class Concurrent::ScheduledTask < ::Concurrent::IVar + include ::Comparable + + # Schedule a task for execution at a specified future time. + # + # @option opts + # @param delay [Float] the number of seconds to wait for before executing the task + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] When no block is given + # @raise [ArgumentError] When given a time that is in the past + # @return [ScheduledTask] a new instance of ScheduledTask + # @yield the task to be performed + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#178 + def initialize(delay, opts = T.unsafe(nil), &task); end + + # Comparator which orders by schedule time. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#213 + def <=>(other); end + + # Cancel this task and prevent it from executing. A task can only be + # cancelled if it is pending or unscheduled. + # + # @return [Boolean] true if successfully cancelled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#235 + def cancel; end + + # Has the task been cancelled? + # + # @return [Boolean] true if the task is in the given state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#220 + def cancelled?; end + + # Execute an `:unscheduled` `ScheduledTask`. Immediately sets the state to `:pending` + # and starts counting down toward execution. Does nothing if the `ScheduledTask` is + # in any state other than `:unscheduled`. + # + # @return [ScheduledTask] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#273 + def execute; end + + # The executor on which to execute the task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#163 + def executor; end + + # The `delay` value given at instanciation. + # + # @return [Float] the initial delay. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#199 + def initial_delay; end + + # Execute the task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#297 + def process_task; end + + # In the task execution in progress? + # + # @return [Boolean] true if the task is in the given state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#227 + def processing?; end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @raise [ArgumentError] When given a time that is in the past + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#262 + def reschedule(delay); end + + # Reschedule the task using the original delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#250 + def reset; end + + # The monotonic time at which the the task is scheduled to be executed. + # + # @return [Float] the schedule time or nil if `unscheduled` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#206 + def schedule_time; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 + def fail(reason = T.unsafe(nil)); end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#326 + def ns_reschedule(delay); end + + # Schedule the task using the given delay and the current time. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#312 + def ns_schedule(delay); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 + def set(value = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 + def try_set(value = T.unsafe(nil), &block); end + + class << self + # Create a new `ScheduledTask` object with the given block, execute it, and return the + # `:pending` object. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @raise [ArgumentError] if no block is given + # @return [ScheduledTask] the newly created `ScheduledTask` in the `:pending` state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#290 + def execute(delay, opts = T.unsafe(nil), &task); end + end +end + +# A counting semaphore. Conceptually, a semaphore maintains a set of +# permits. Each {#acquire} blocks if necessary until a permit is +# available, and then takes it. Each {#release} adds a permit, potentially +# releasing a blocking acquirer. +# However, no actual permit objects are used; the Semaphore just keeps a +# count of the number available and acts accordingly. +# Alternatively, permits may be acquired within a block, and automatically +# released after the block finishes executing. +# +# @example +# semaphore = Concurrent::Semaphore.new(2) +# +# t1 = Thread.new do +# semaphore.acquire +# puts "Thread 1 acquired semaphore" +# end +# +# t2 = Thread.new do +# semaphore.acquire +# puts "Thread 2 acquired semaphore" +# end +# +# t3 = Thread.new do +# semaphore.acquire +# puts "Thread 3 acquired semaphore" +# end +# +# t4 = Thread.new do +# sleep(2) +# puts "Thread 4 releasing semaphore" +# semaphore.release +# end +# +# [t1, t2, t3, t4].each(&:join) +# +# # prints: +# # Thread 3 acquired semaphore +# # Thread 2 acquired semaphore +# # Thread 4 releasing semaphore +# # Thread 1 acquired semaphore +# @example +# semaphore = Concurrent::Semaphore.new(1) +# +# puts semaphore.available_permits +# semaphore.acquire do +# puts semaphore.available_permits +# end +# puts semaphore.available_permits +# +# # prints: +# # 1 +# # 0 +# # 1 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#161 +class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#96 +Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore + +# Indicates that the including `ExecutorService` guarantees +# that all operations will occur in the order they are post and that no +# two operations may occur simultaneously. This module provides no +# functionality and provides no guarantees. That is the responsibility +# of the including class. This module exists solely to allow the including +# object to be interrogated for its serialization status. +# +# @example +# class Foo +# include Concurrent::SerialExecutor +# end +# +# foo = Foo.new +# +# foo.is_a? Concurrent::ExecutorService #=> true +# foo.is_a? Concurrent::SerialExecutor #=> true +# foo.serialized? #=> true +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#24 +module Concurrent::SerialExecutorService + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + + # Does this executor guarantee serialization of its operations? + # + # @note Always returns `true` + # @return [Boolean] True if the executor guarantees that all operations + # will be post in the order they are received and no two operations may + # occur simultaneously. Else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#30 + def serialized?; end +end + +# Ensures passed jobs in a serialized order never running at the same time. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#8 +class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject + include ::Logger::Severity + include ::Concurrent::Concern::Logging + + # @return [SerializedExecution] a new instance of SerializedExecution + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#11 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param executor [Executor] to be used for this job + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#34 + def post(executor, *args, &task); end + + # As {#post} but allows to submit multiple tasks at once, it's guaranteed that they will not + # be interleaved by other tasks. + # + # @param posts [Array, Proc)>] array of triplets where + # first is a {ExecutorService}, second is array of args for task, third is a task (Proc) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#44 + def posts(posts); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#75 + def call_job(job); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#70 + def ns_initialize; end + + # ensures next job is executed if any is stashed + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#95 + def work(job); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 +class Concurrent::SerializedExecution::Job < ::Struct + # Returns the value of attribute args + # + # @return [Object] the current value of args + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + def args=(_); end + + # Returns the value of attribute block + # + # @return [Object] the current value of block + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#17 + def call; end + + # Returns the value of attribute executor + # + # @return [Object] the current value of executor + def executor; end + + # Sets the attribute executor + # + # @param value [Object] the value to set the attribute executor to. + # @return [Object] the newly set value + def executor=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# A wrapper/delegator for any `ExecutorService` that +# guarantees serialized execution of tasks. +# +# @see [SimpleDelegator](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/delegate/rdoc/SimpleDelegator.html) +# @see Concurrent::SerializedExecution +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#12 +class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::SerialExecutorService + + # @return [SerializedExecutionDelegator] a new instance of SerializedExecutionDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#15 + def initialize(executor); end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#22 + def post(*args, &task); end +end + +# A thread-safe subclass of Set. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`. +# +# @note `a += b` is **not** a **thread-safe** operation on +# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` +# which is union of `a` and `b`, then it writes the union to `a`. +# The read and write are independent operations they do not form a single atomic +# operation therefore when two `+=` operations are executed concurrently updates +# may be lost. Use `#merge` instead. +# @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#61 +class Concurrent::Set < ::Concurrent::CRubySet; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#23 +Concurrent::SetImplementation = Concurrent::CRubySet + +# An thread-safe, write-once variation of Ruby's standard `Struct`. +# Each member can have its value set at most once, either at construction +# or any time thereafter. Attempting to assign a value to a member +# that has already been set will result in a `Concurrent::ImmutabilityError`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#14 +module Concurrent::SettableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#50 + def ==(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#45 + def [](member); end + + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # @raise [Concurrent::ImmutabilityError] if the given member has already been set + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#75 + def []=(member, value); end + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#55 + def each(&block); end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#61 + def each_pair(&block); end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 + def inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#35 + def merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#67 + def select(&block); end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 + def to_a; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#40 + def to_h; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 + def to_s; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 + def values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#24 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#97 + def initialize_copy(original); end + + class << self + # Factory for creating new struct classes. + # + # ``` + # new([class_name] [, member_name]+>) -> StructClass click to toggle source + # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass + # new(value, ...) -> obj + # StructClass[value, ...] -> obj + # ``` + # + # The first two forms are used to create a new struct subclass `class_name` + # that can contain a value for each member_name . This subclass can be + # used to create instances of the structure like any other Class . + # + # If the `class_name` is omitted an anonymous struct class will be created. + # Otherwise, the name of this struct will appear as a constant in the struct class, + # so it must be unique for all structs under this base class and must start with a + # capital letter. Assigning a struct class to a constant also gives the class + # the name of the constant. + # + # If a block is given it will be evaluated in the context of `StructClass`, passing + # the created class as a parameter. This is the recommended way to customize a struct. + # Subclassing an anonymous struct creates an extra anonymous class that will never be used. + # + # The last two forms create a new instance of a struct subclass. The number of value + # parameters must be less than or equal to the number of attributes defined for the + # struct. Unset parameters default to nil. Passing more parameters than number of attributes + # will raise an `ArgumentError`. + # + # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#105 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#115 +Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# An executor service in which every operation spawns a new, +# independently operating thread. +# +# This is perhaps the most inefficient executor service in this +# library. It exists mainly for testing an debugging. Thread creation +# and management is expensive in Ruby and this executor performs no +# resource pooling. This can be very beneficial during testing and +# debugging because it decouples the using code from the underlying +# executor implementation. In production this executor will likely +# lead to suboptimal performance. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#21 +class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#56 + def <<(task); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#84 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#40 + def post(*args, &task); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#62 + def running?; end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#77 + def shutdown; end + + # Is the executor shutdown? + # + # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#72 + def shutdown?; end + + # Is the executor shuttingdown? + # + # @return [Boolean] `true` when not running and not shutdown, else `false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#67 + def shuttingdown?; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#91 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#97 + def ns_initialize(*args); end + + class << self + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#34 + def <<(task); end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#24 + def post(*args); end + end +end + +# A thread pool with a single thread an unlimited queue. Should the thread +# die for any reason it will be removed and replaced, thus ensuring that +# the executor will always remain viable and available to process jobs. +# +# A common pattern for background processing is to create a single thread +# on which an infinite loop is run. The thread's loop blocks on an input +# source (perhaps blocking I/O or a queue) and processes each input as it +# is received. This pattern has several issues. The thread itself is highly +# susceptible to errors during processing. Also, the thread itself must be +# constantly monitored and restarted should it die. `SingleThreadExecutor` +# encapsulates all these bahaviors. The task processor is highly resilient +# to errors from within tasks. Also, should the thread die it will +# automatically be restarted. +# +# The API and behavior of this class are based on Java's `SingleThreadExecutor`. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#37 +class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#10 +Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#2 +module Concurrent::Synchronization + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb#7 + def full_memory_barrier; end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#9 +class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object + protected + + # Broadcast to all waiting threads. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def broadcast + # synchronize { ns_broadcast } + # end + # ``` + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#96 + def ns_broadcast; end + + # Signal one waiting thread. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def signal + # synchronize { ns_signal } + # end + # ``` + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#81 + def ns_signal; end + + # Wait until another thread calls #signal or #broadcast, + # spurious wake-ups can happen. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait(timeout = nil) + # synchronize { ns_wait(timeout) } + # end + # ``` + # @param timeout [Numeric, nil] in seconds, `nil` means no timeout + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#66 + def ns_wait(timeout = T.unsafe(nil)); end + + # Wait until condition is met or timeout passes, + # protects against spurious wake-ups. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait_until(timeout = nil, &condition) + # synchronize { ns_wait_until(timeout, &condition) } + # end + # ``` + # @param timeout [Numeric, nil] in seconds, `nil` means no timeout + # @return [true, false] if condition met + # @yield condition to be met + # @yieldreturn [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # @note can by made public in descendants if required by `public :synchronize` + # @raise [NotImplementedError] + # @yield runs the block synchronized against this object, + # equivalent of java's `synchronize(this) {}` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#18 + def synchronize; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#6 +class Concurrent::Synchronization::AbstractObject + # @return [AbstractObject] a new instance of AbstractObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#7 + def initialize; end + + # @abstract + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#13 + def full_memory_barrier; end + + class << self + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#17 + def attr_volatile(*names); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#6 +module Concurrent::Synchronization::AbstractStruct + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#9 + def initialize(*values); end + + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 + def length; end + + # Returns the struct members as an array of symbols. + # + # @return [Array] the struct members as an array of symbols + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#29 + def members; end + + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 + def size; end + + protected + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#82 + def ns_each; end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#89 + def ns_each_pair; end + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#75 + def ns_equality(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#59 + def ns_get(member); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#119 + def ns_initialize_copy; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#105 + def ns_inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam selfvalue [Object] the value of the member in `self` + # @yieldparam othervalue [Object] the value of the member in `other` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#114 + def ns_merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#98 + def ns_select; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#52 + def ns_to_h; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#38 + def ns_values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#45 + def ns_values_at(indexes); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#130 + def pr_underscore(clazz); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#141 + def define_struct_class(parent, base, name, members, &block); end + end +end + +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#8 +class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::LockableObject + # @return [Condition] a new instance of Condition + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#18 + def initialize(lock); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#47 + def broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#51 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#43 + def ns_signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#27 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#35 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#39 + def signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#23 + def wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#31 + def wait_until(timeout = T.unsafe(nil), &condition); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def private_new(*args, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#8 +module Concurrent::Synchronization::ConditionSignalling + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 + def ns_signal; end +end + +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#8 +class Concurrent::Synchronization::Lock < ::Concurrent::Synchronization::LockableObject + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#31 + def broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 + def ns_signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#25 + def signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 + def synchronize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#13 + def wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#19 + def wait_until(timeout = T.unsafe(nil), &condition); end +end + +# Safe synchronization under any Ruby implementation. +# It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. +# Provides a single layer which can improve its implementation over time without changes needed to +# the classes using it. Use {Synchronization::Object} not this abstract class. +# +# @note this object does not support usage together with +# [`Thread#wakeup`](http://ruby-doc.org/core/Thread.html#method-i-wakeup) +# and [`Thread#raise`](http://ruby-doc.org/core/Thread.html#method-i-raise). +# `Thread#sleep` and `Thread#wakeup` will work as expected but mixing `Synchronization::Object#wait` and +# `Thread#wakeup` will not work on all platforms. +# +# @see Event implementation as an example of this class use +# +# @example simple +# class AnClass < Synchronization::Object +# def initialize +# super +# synchronize { @value = 'asd' } +# end +# +# def value +# synchronize { @value } +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#50 +class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronization::MutexLockableObject + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#57 + def new_condition; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#11 +Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#60 +class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject + include ::Concurrent::Synchronization::ConditionSignalling + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [MonitorLockableObject] a new instance of MonitorLockableObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#65 + def initialize; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#83 + def ns_wait(timeout = T.unsafe(nil)); end + + # TODO may be a problem with lock.synchronize { lock.wait } + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#79 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#71 + def initialize_copy(other); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#25 +class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject + include ::Concurrent::Synchronization::ConditionSignalling + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [MutexLockableObject] a new instance of MutexLockableObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#30 + def initialize; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#36 + def initialize_copy(other); end +end + +# Abstract object providing final, volatile, ans CAS extensions to build other concurrent abstractions. +# - final instance variables see {Object.safe_initialization!} +# - volatile instance variables see {Object.attr_volatile} +# - volatile instance variables see {Object.attr_atomic} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#15 +class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::AbstractObject + include ::Concurrent::Synchronization::Volatile + extend ::Concurrent::Synchronization::Volatile::ClassMethods + + # Has to be called by children. + # + # @return [Object] a new instance of Object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#28 + def initialize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#146 + def __initialize_atomic_fields__; end + + class << self + # @return [true, false] is the attribute with name atomic? + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#125 + def atomic_attribute?(name); end + + # @param inherited [true, false] should inherited volatile with CAS fields be returned? + # @return [::Array] Returns defined volatile with CAS fields on this class. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#119 + def atomic_attributes(inherited = T.unsafe(nil)); end + + # Creates methods for reading and writing to a instance variable with + # volatile (Java) semantic as {.attr_volatile} does. + # The instance variable should be accessed oly through generated methods. + # This method generates following methods: `value`, `value=(new_value) #=> new_value`, + # `swap_value(new_value) #=> old_value`, + # `compare_and_set_value(expected, value) #=> true || false`, `update_value(&block)`. + # + # @param names [::Array] of the instance variables to be volatile with CAS. + # @return [::Array] names of defined method names. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#84 + def attr_atomic(*names); end + + # For testing purposes, quite slow. Injects assert code to new method which will raise if class instance contains + # any instance variables with CamelCase names and isn't {.safe_initialization?}. + # + # @raise when offend found + # @return [true] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#45 + def ensure_safe_initialization_when_final_fields_are_present; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#33 + def safe_initialization!; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#37 + def safe_initialization?; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#131 + def define_initialize_atomic_fields; end + end +end + +# By extending this module, a class and all its children are marked to be constructed safely. Meaning that +# all writes (ivar initializations) are made visible to all readers of newly constructed object. It ensures +# same behaviour as Java's final fields. +# +# Due to using Kernel#extend, the module is not included again if already present in the ancestors, +# which avoids extra overhead. +# +# @example +# class AClass < Concurrent::Synchronization::Object +# extend Concurrent::Synchronization::SafeInitialization +# +# def initialize +# @AFinalValue = 'value' # published safely, #foo will never return nil +# end +# +# def foo +# @AFinalValue +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#28 +module Concurrent::Synchronization::SafeInitialization + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end +end + +# Volatile adds the attr_volatile class method when included. +# +# foo = Foo.new +# foo.bar +# => 1 +# foo.bar = 2 +# => 2 +# +# @example +# class Foo +# include Concurrent::Synchronization::Volatile +# +# attr_volatile :bar +# +# def initialize +# self.bar = 1 +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#28 +module Concurrent::Synchronization::Volatile + mixes_in_class_methods ::Concurrent::Synchronization::Volatile::ClassMethods + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#33 + def full_memory_barrier; end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#29 + def included(base); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#37 +module Concurrent::Synchronization::Volatile::ClassMethods + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#39 + def attr_volatile(*names); end +end + +# This class provides a trivial way to synchronize all calls to a given object +# by wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls +# around the delegated `#send`. Example: +# +# array = [] # not thread-safe on many impls +# array = SynchronizedDelegator.new([]) # thread-safe +# +# A simple `Monitor` provides a very coarse-grained way to synchronize a given +# object, in that it will cause synchronization for methods that have no need +# for it, but this is a trivial way to get thread-safety where none may exist +# currently on some implementations. +# +# This class is currently being considered for inclusion into stdlib, via +# https://bugs.ruby-lang.org/issues/8556 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#21 +class Concurrent::SynchronizedDelegator < ::SimpleDelegator + # @return [SynchronizedDelegator] a new instance of SynchronizedDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#31 + def initialize(obj); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#36 + def method_missing(method, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#22 + def setup; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#27 + def teardown; end +end + +# A `TVar` is a transactional variable - a single-element container that +# is used as part of a transaction - see `Concurrent::atomically`. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# {include:file:docs-source/tvar.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#12 +class Concurrent::TVar < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `TVar` with an initial value. + # + # @return [TVar] a new instance of TVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#16 + def initialize(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#46 + def unsafe_lock; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#36 + def unsafe_value; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#41 + def unsafe_value=(value); end + + # Get the value of a `TVar`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#22 + def value; end + + # Set the value of a `TVar`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#29 + def value=(value); end +end + +# A `ThreadLocalVar` is a variable where the value is different for each thread. +# Each variable may have a default value, but when you modify the variable only +# the current thread will ever see that change. +# +# This is similar to Ruby's built-in thread-local variables (`Thread#thread_variable_get`), +# but with these major advantages: +# * `ThreadLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in thread-local variable leaks some memory forever (it's a Symbol held forever on the thread), +# so it's only OK to create a small amount of them. +# `ThreadLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in thread-local variables leak forever the value set on each thread (unless set to nil explicitly). +# `ThreadLocalVar` automatically removes the mapping for each thread once the `ThreadLocalVar` instance is GC'd. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @example +# v = ThreadLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# @example +# v = ThreadLocalVar.new(14) +# +# t1 = Thread.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end +# +# t2 = Thread.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end +# +# v.value #=> 14 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#43 +class Concurrent::ThreadLocalVar + # Creates a thread local variable. + # + # @param default [Object] the default value when otherwise unset + # @param default_block [Proc] Optional block that gets called to obtain the + # default value for each thread + # @return [ThreadLocalVar] a new instance of ThreadLocalVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#51 + def initialize(default = T.unsafe(nil), &default_block); end + + # Bind the given value to thread local storage during + # execution of the given block. + # + # @param value [Object] the value to bind + # @return [Object] the value + # @yield the operation to be performed with the bound variable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#88 + def bind(value); end + + # Returns the value in the current thread's copy of this thread-local variable. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#70 + def value; end + + # Sets the current thread's copy of this thread-local variable to the specified value. + # + # @param value [Object] the value to set + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#78 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#103 + def default; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#44 +Concurrent::ThreadLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::ThreadLocals) + +# An array-backed storage of indexed variables per thread. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#141 +class Concurrent::ThreadLocals < ::Concurrent::AbstractLocals + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#142 + def locals; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#146 + def locals!; end +end + +# An abstraction composed of one or more threads and a task queue. Tasks +# (blocks or `proc` objects) are submitted to the pool and added to the queue. +# The threads in the pool remove the tasks and execute them in the order +# they were received. +# +# A `ThreadPoolExecutor` will automatically adjust the pool size according +# to the bounds set by `min-threads` and `max-threads`. When a new task is +# submitted and fewer than `min-threads` threads are running, a new thread +# is created to handle the request, even if other worker threads are idle. +# If there are more than `min-threads` but less than `max-threads` threads +# running, a new thread will be created only if the queue is full. +# +# Threads that are idle for too long will be garbage collected, down to the +# configured minimum options. Should a thread crash it, too, will be garbage collected. +# +# `ThreadPoolExecutor` is based on the Java class of the same name. From +# the official Java documentation; +# +# > Thread pools address two different problems: they usually provide +# > improved performance when executing large numbers of asynchronous tasks, +# > due to reduced per-task invocation overhead, and they provide a means +# > of bounding and managing the resources, including threads, consumed +# > when executing a collection of tasks. Each ThreadPoolExecutor also +# > maintains some basic statistics, such as the number of completed tasks. +# > +# > To be useful across a wide range of contexts, this class provides many +# > adjustable parameters and extensibility hooks. However, programmers are +# > urged to use the more convenient Executors factory methods +# > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), +# > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single +# > background thread), that preconfigure settings for the most common usage +# > scenarios. +# +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#56 +class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#10 +Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#4 +module Concurrent::ThreadSafe; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#7 +module Concurrent::ThreadSafe::Util + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#16 + def make_synchronized_on_cruby(klass); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#41 + def make_synchronized_on_truffleruby(klass); end + end +end + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::ProcessorCounter +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#13 +Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#10 +Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#11 +Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) + +# Raised when an operation times out. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#55 +class Concurrent::TimeoutError < ::Concurrent::Error; end + +# Executes a collection of tasks, each after a given delay. A master task +# monitors the set and schedules each task for execution at the appropriate +# time. Tasks are run on the global thread pool or on the supplied executor. +# Each task is represented as a `ScheduledTask`. +# +# @see Concurrent::ScheduledTask +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#19 +class Concurrent::TimerSet < ::Concurrent::RubyExecutorService + # Create a new set of timed tasks. + # + # @option opts + # @param opts [Hash] the options used to specify the executor on which to perform actions + # @return [TimerSet] a new instance of TimerSet # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each key in the map - # @yieldparam key [Object] + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#30 + def initialize(opts = T.unsafe(nil)); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#255 - def each_key; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#62 + def kill; end - # Iterates over each key value pair. - # This method is atomic. + # Post a task to be execute run after a given delay (in seconds). If the + # delay is less than 1/100th of a second the task will be immediately post + # to the executor. # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each key value pair in the map - # @yieldparam key [Object] - # @yieldparam value [Object] + # @param delay [Float] the number of seconds to wait for before executing the task. + # @param args [Array] the arguments passed to the task on execution. + # @raise [ArgumentError] if the intended execution time is not in the future. + # @raise [ArgumentError] if no block is given. + # @return [Concurrent::ScheduledTask, false] IVar representing the task if the post + # is successful; false after shutdown. + # @yield the task to be performed. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 - def each_pair; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#48 + def post(delay, *args, &task); end - # Iterates over each value. - # This method is atomic. + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # Initialize the object. # - # @note Atomic methods taking a block do not allow the `self` instance - # to be used within the block. Doing so will cause a deadlock. - # @return [self] - # @yield for each value in the map - # @yieldparam value [Object] + # @param opts [Hash] the options to create the object with. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#264 - def each_value; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#74 + def ns_initialize(opts); end - # Is map empty? - # - # @return [true, false] + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#94 + def ns_post_task(task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#129 + def ns_reset_if_forked; end + + # `ExecutorService` callback called during shutdown. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#291 - def empty?; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#122 + def ns_shutdown_execution; end - # Get a value with key, or default_value when key is absent, - # or fail when no default_value is given. + # Post the task to the internal queue. # - # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended - # to be use as a concurrency primitive with strong happens-before - # guarantees. It is not intended to be used as a high-level abstraction - # supporting complex operations. All read and write operations are - # thread safe, but no guarantees are made regarding race conditions - # between the fetch operation and yielding to the block. Additionally, - # this method does not support recursion. This is due to internal - # constraints that are very unlikely to change in the near future. - # @param key [Object] - # @param default_value [Object] - # @raise [KeyError] when key is missing and no default_value is provided - # @return [Object] the value or default value - # @yield default value for a key - # @yieldparam key [Object] - # @yieldreturn [Object] default value + # @note This is intended as a callback method from ScheduledTask + # only. It is not intended to be used directly. Post a task + # by using the `SchedulesTask#execute` method. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#183 - def fetch(key, default_value = T.unsafe(nil)); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#89 + def post_task(task); end - # Fetch value with key, or store default value when key is absent, - # or fail when no default_value is given. This is a two step operation, - # therefore not atomic. The store can overwrite other concurrently - # stored value. - # - # @param key [Object] - # @param default_value [Object] - # @return [Object] the value or default value - # @yield default value for a key - # @yieldparam key [Object] - # @yieldreturn [Object] default value + # Run a loop and execute tasks in the scheduled order and at the approximate + # scheduled time. If no tasks remain the thread will exit gracefully so that + # garbage collection can occur. If there are no ready tasks it will sleep + # for up to 60 seconds waiting for the next scheduled task. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#205 - def fetch_or_store(key, default_value = T.unsafe(nil)); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#143 + def process_tasks; end - # Get a value with key + # Remove the given task from the queue. # - # @param key [Object] - # @return [Object] the value + # @note This is intended as a callback method from `ScheduledTask` + # only. It is not intended to be used directly. Cancel a task + # by using the `ScheduledTask#cancel` method. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 - def get(key); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#115 + def remove_task(task); end +end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#321 - def inspect; end +# A very common concurrency pattern is to run a thread that performs a task at +# regular intervals. The thread that performs the task sleeps for the given +# interval then wakes up and performs the task. Lather, rinse, repeat... This +# pattern causes two problems. First, it is difficult to test the business +# logic of the task because the task itself is tightly coupled with the +# concurrency logic. Second, an exception raised while performing the task can +# cause the entire thread to abend. In a long-running application where the +# task thread is intended to run for days/weeks/years a crashed task thread +# can pose a significant problem. `TimerTask` alleviates both problems. +# +# When a `TimerTask` is launched it starts a thread for monitoring the +# execution interval. The `TimerTask` thread does not perform the task, +# however. Instead, the TimerTask launches the task on a separate thread. +# Should the task experience an unrecoverable crash only the task thread will +# crash. This makes the `TimerTask` very fault tolerant. Additionally, the +# `TimerTask` thread can respond to the success or failure of the task, +# performing logging or ancillary operations. +# +# One other advantage of `TimerTask` is that it forces the business logic to +# be completely decoupled from the concurrency logic. The business logic can +# be tested separately then passed to the `TimerTask` for scheduling and +# running. +# +# In some cases it may be necessary for a `TimerTask` to affect its own +# execution cycle. To facilitate this, a reference to the TimerTask instance +# is passed as an argument to the provided block every time the task is +# executed. +# +# The `TimerTask` class includes the `Dereferenceable` mixin module so the +# result of the last execution is always available via the `#value` method. +# Dereferencing options can be passed to the `TimerTask` during construction or +# at any later time using the `#set_deref_options` method. +# +# `TimerTask` supports notification through the Ruby standard library +# {http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# Observable} module. On execution the `TimerTask` will notify the observers +# with three arguments: time of execution, the result of the block (or nil on +# failure), and any raised exceptions (or nil on success). +# +# @example Basic usage +# task = Concurrent::TimerTask.new{ puts 'Boom!' } +# task.execute +# +# task.execution_interval #=> 60 (default) +# +# # wait 60 seconds... +# #=> 'Boom!' +# +# task.shutdown #=> true +# @example Configuring `:execution_interval` +# task = Concurrent::TimerTask.new(execution_interval: 5) do +# puts 'Boom!' +# end +# +# task.execution_interval #=> 5 +# @example Immediate execution with `:run_now` +# task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } +# task.execute +# +# #=> 'Boom!' +# @example Last `#value` and `Dereferenceable` mixin +# task = Concurrent::TimerTask.new( +# dup_on_deref: true, +# execution_interval: 5 +# ){ Time.now } +# +# task.execute +# Time.now #=> 2013-11-07 18:06:50 -0500 +# sleep(10) +# task.value #=> 2013-11-07 18:06:55 -0500 +# @example Controlling execution from within the block +# timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| +# task.execution_interval.times{ print 'Boom! ' } +# print "\n" +# task.execution_interval += 1 +# if task.execution_interval > 5 +# puts 'Stopping...' +# task.shutdown +# end +# end +# +# timer_task.execute # blocking call - this task will stop itself +# #=> Boom! +# #=> Boom! Boom! +# #=> Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! Boom! +# #=> Stopping... +# @example Observation +# class TaskObserver +# def update(time, result, ex) +# if result +# print "(#{time}) Execution successfully returned #{result}\n" +# else +# print "(#{time}) Execution failed with error #{ex}\n" +# end +# end +# end +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ 42 } +# task.add_observer(TaskObserver.new) +# task.execute +# sleep 4 +# +# #=> (2013-10-13 19:08:58 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:08:59 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:09:00 -0400) Execution successfully returned 42 +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ sleep } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:07:25 -0400) Execution timed out +# #=> (2013-10-13 19:07:27 -0400) Execution timed out +# #=> (2013-10-13 19:07:29 -0400) Execution timed out +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ raise StandardError } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:09:37 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:38 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:39 -0400) Execution failed with error StandardError +# task.shutdown +# @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#148 +class Concurrent::TimerTask < ::Concurrent::RubyExecutorService + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Observable - # Find key of a value. + # Create a new TimerTask with the given task and configuration. # - # @param value [Object] - # @return [Object, nil] key or nil when not found + # @option opts + # @option opts + # @param opts [Hash] the options defining task execution. + # @raise ArgumentError when no block is given. + # @return [TimerTask] the new `TimerTask` + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#284 - def key(value); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#180 + def initialize(opts = T.unsafe(nil), &task); end - # All keys + # Execute a previously created `TimerTask`. # - # @return [::Array] keys + # @example Instance and execute in separate steps + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> false + # task.execute + # task.running? #=> true + # @example Instance and execute in one line + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute + # task.running? #=> true + # @return [TimerTask] a reference to `self` # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#236 - def keys; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#206 + def execute; end - # @raise [TypeError] + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#305 - def marshal_dump; end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#230 + def execution_interval; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#313 - def marshal_load(hash); end + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#237 + def execution_interval=(value); end - # Set a value with key + # Is the executor running? # - # @param key [Object] - # @param value [Object] - # @return [Object] the new value + # @return [Boolean] `true` when running, `false` when shutting down or shutdown # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 - def put(key, value); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#189 + def running?; end - # Insert value into map with key if key is absent in one atomic step. + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. # - # @param key [Object] - # @param value [Object] - # @return [Object, nil] the previous value when key was present or nil when there was no key + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#248 + def timeout_interval; end + + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#215 - def put_if_absent(key, value); end + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#255 + def timeout_interval=(value); end - # Is the value stored in the map. Iterates over all values. + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#297 + def execute_task(completion); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#263 + def ns_initialize(opts, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#285 + def ns_kill_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#279 + def ns_shutdown_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 + def post(*args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#291 + def schedule_next_task(interval = T.unsafe(nil)); end + + class << self + # Create and execute a new `TimerTask`. + # + # @example + # task = Concurrent::TimerTask.execute(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> true + # @option opts + # @option opts + # @param opts [Hash] the options defining task execution. + # @raise ArgumentError when no block is given. + # @return [TimerTask] the new `TimerTask` + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#223 + def execute(opts = T.unsafe(nil), &task); end + end +end + +# Default `:execution_interval` in seconds. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#153 +Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) + +# Default `:timeout_interval` in seconds. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#156 +Concurrent::TimerTask::TIMEOUT_INTERVAL = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#153 +class Concurrent::Transaction + # @return [Transaction] a new instance of Transaction # - # @param value [Object] - # @return [true, false] + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#162 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#192 + def abort; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#196 + def commit; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#177 + def open(tvar); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#166 + def read(tvar); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#206 + def unlock; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#171 + def write(tvar, value); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#212 + def current; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#216 + def current=(transaction); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#155 +Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#159 +class Concurrent::Transaction::AbortError < ::StandardError; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#160 +class Concurrent::Transaction::LeaveError < ::StandardError; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 +class Concurrent::Transaction::OpenEntry < ::Struct + # Returns the value of attribute modified # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#227 - def value?(value); end + # @return [Object] the current value of modified + def modified; end - # All values + # Sets the attribute modified # - # @return [::Array] values + # @param value [Object] the value to set the attribute modified to. + # @return [Object] the newly set value + def modified=(_); end + + # Returns the value of attribute value # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#244 - def values; end + # @return [Object] the current value of value + def value; end - private + # Sets the attribute value + # + # @param value [Object] the value to set the attribute value to. + # @return [Object] the newly set value + def value=(_); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#331 - def initialize_copy(other); end + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#336 - def populate_from(hash); end +# A fixed size array with volatile (synchronized, thread safe) getters/setters. +# Mixes in Ruby's `Enumerable` module for enhanced search, sort, and traversal. +# +# @example +# tuple = Concurrent::Tuple.new(16) +# +# tuple.set(0, :foo) #=> :foo | volatile write +# tuple.get(0) #=> :foo | volatile read +# tuple.compare_and_set(0, :foo, :bar) #=> true | strong CAS +# tuple.cas(0, :foo, :baz) #=> false | strong CAS +# tuple.get(0) #=> :bar | volatile read +# @see https://en.wikipedia.org/wiki/Tuple Tuple entry at Wikipedia +# @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple +# @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#20 +class Concurrent::Tuple + include ::Enumerable - # @raise [KeyError] + # Create a new tuple of the given size. # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#327 - def raise_fetch_no_key; end + # @param size [Integer] the number of elements in the tuple + # @return [Tuple] a new instance of Tuple + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#29 + def initialize(size); end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#341 - def validate_options_hash!(options); end -end + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param i [Integer] the index for the element to set + # @param old_value [Object] the value to compare against the current value + # @param new_value [Object] the value to set at the given index + # @return [Boolean] true if the value at the given element was set else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 + def cas(i, old_value, new_value); end -# Various classes within allows for +nil+ values to be stored, -# so a special +NULL+ token is required to indicate the "nil-ness". -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#6 -Concurrent::NULL = T.let(T.unsafe(nil), Object) + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param i [Integer] the index for the element to set + # @param old_value [Object] the value to compare against the current value + # @param new_value [Object] the value to set at the given index + # @return [Boolean] true if the value at the given element was set else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 + def compare_and_set(i, old_value, new_value); end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#4 -module Concurrent::ThreadSafe; end + # Calls the given block once for each element in self, passing that element as a parameter. + # + # @yieldparam ref [Object] the `Concurrent::AtomicReference` object at the current index + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#78 + def each; end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#7 -module Concurrent::ThreadSafe::Util; end + # Get the value of the element at the given index. + # + # @param i [Integer] the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 + def get(i); end -# TODO (pitr-ch 15-Oct-2016): migrate to Utility::ProcessorCounter -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#13 -Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) + # Set the element at the given index to the given value + # + # @param i [Integer] the index for the element to set + # @param value [Object] the value to set at the given index + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 + def set(i, value); end -# TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger -# -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#10 -Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) + # The (fixed) size of the tuple. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#24 + def size; end -# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#11 -Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) + # Get the value of the element at the given index. + # + # @param i [Integer] the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 + def volatile_get(i); end + + # Set the element at the given index to the given value + # + # @param i [Integer] the index for the element to set + # @param value [Object] the value to set at the given index + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 + def volatile_set(i, value); end +end # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#3 module Concurrent::Utility; end @@ -403,3 +11450,96 @@ module Concurrent::Utility::EngineDetector # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#31 def ruby_version(version = T.unsafe(nil), comparison, major, minor, patch); end end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#9 +module Concurrent::Utility::NativeExtensionLoader + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#11 + def allow_c_extensions?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#15 + def c_extensions_loaded?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#19 + def load_native_extensions; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#50 + def java_extensions_loaded?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#38 + def load_error_path(error); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#46 + def set_c_extensions_loaded; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#54 + def set_java_extensions_loaded; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#58 + def try_load_c_extension(path); end +end + +# @private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#5 +module Concurrent::Utility::NativeInteger + extend ::Concurrent::Utility::NativeInteger + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#24 + def ensure_integer(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#31 + def ensure_integer_and_bounds(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#17 + def ensure_lower_bound(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#37 + def ensure_positive(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#44 + def ensure_positive_and_no_zero(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#10 + def ensure_upper_bound(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#8 +Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) + +# http://stackoverflow.com/questions/535721/ruby-max-integer +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#7 +Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#10 +class Concurrent::Utility::ProcessorCounter + # @return [ProcessorCounter] a new instance of ProcessorCounter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#11 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#20 + def physical_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#16 + def processor_count; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#34 + def compute_physical_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 + def compute_processor_count; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/version.rb#2 +Concurrent::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi deleted file mode 100644 index f6b1d8e..0000000 --- a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +++ /dev/null @@ -1,14237 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `language_server-protocol` gem. -# Please instead update this file by running `bin/tapioca gem language_server-protocol`. - -# source://language_server-protocol//lib/language_server/protocol/version.rb#1 -module LanguageServer; end - -# source://language_server-protocol//lib/language_server/protocol/version.rb#2 -module LanguageServer::Protocol; end - -# source://language_server-protocol//lib/language_server/protocol/constant.rb#3 -module LanguageServer::Protocol::Constant; end - -# The kind of a code action. -# -# Kinds are a hierarchical list of identifiers separated by `.`, -# e.g. `"refactor.extract.function"`. -# -# The set of kinds is open and client needs to announce the kinds it supports -# to the server during initialization. -# A set of predefined code action kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#14 -module LanguageServer::Protocol::Constant::CodeActionKind; end - -# Empty kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#18 -LanguageServer::Protocol::Constant::CodeActionKind::EMPTY = T.let(T.unsafe(nil), String) - -# Base kind for quickfix actions: 'quickfix'. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#22 -LanguageServer::Protocol::Constant::CodeActionKind::QUICK_FIX = T.let(T.unsafe(nil), String) - -# Base kind for refactoring actions: 'refactor'. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#26 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR = T.let(T.unsafe(nil), String) - -# Base kind for refactoring extraction actions: 'refactor.extract'. -# -# Example extract actions: -# -# - Extract method -# - Extract function -# - Extract variable -# - Extract interface from class -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#38 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_EXTRACT = T.let(T.unsafe(nil), String) - -# Base kind for refactoring inline actions: 'refactor.inline'. -# -# Example inline actions: -# -# - Inline function -# - Inline variable -# - Inline constant -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#49 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_INLINE = T.let(T.unsafe(nil), String) - -# Base kind for refactoring rewrite actions: 'refactor.rewrite'. -# -# Example rewrite actions: -# -# - Convert JavaScript function to class -# - Add or remove parameter -# - Encapsulate field -# - Make method static -# - Move method to base class -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#62 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_REWRITE = T.let(T.unsafe(nil), String) - -# Base kind for source actions: `source`. -# -# Source code actions apply to the entire file. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#68 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE = T.let(T.unsafe(nil), String) - -# Base kind for a 'fix all' source action: `source.fixAll`. -# -# 'Fix all' actions automatically fix errors that have a clear fix that -# do not require user input. They should not suppress errors or perform -# unsafe fixes such as generating new types or classes. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#81 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_FIX_ALL = T.let(T.unsafe(nil), String) - -# Base kind for an organize imports source action: -# `source.organizeImports`. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#73 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_ORGANIZE_IMPORTS = T.let(T.unsafe(nil), String) - -# The reason why code actions were requested. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::CodeActionTriggerKind; end - -# Code actions were requested automatically. -# -# This typically happens when current selection in a file changes, but can -# also be triggered when file content changes. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#18 -LanguageServer::Protocol::Constant::CodeActionTriggerKind::AUTOMATIC = T.let(T.unsafe(nil), Integer) - -# Code actions were explicitly requested by the user or by an extension. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#11 -LanguageServer::Protocol::Constant::CodeActionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# The kind of a completion entry. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#7 -module LanguageServer::Protocol::Constant::CompletionItemKind; end - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#14 -LanguageServer::Protocol::Constant::CompletionItemKind::CLASS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#23 -LanguageServer::Protocol::Constant::CompletionItemKind::COLOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#28 -LanguageServer::Protocol::Constant::CompletionItemKind::CONSTANT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#11 -LanguageServer::Protocol::Constant::CompletionItemKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#20 -LanguageServer::Protocol::Constant::CompletionItemKind::ENUM = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#27 -LanguageServer::Protocol::Constant::CompletionItemKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#30 -LanguageServer::Protocol::Constant::CompletionItemKind::EVENT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#12 -LanguageServer::Protocol::Constant::CompletionItemKind::FIELD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#24 -LanguageServer::Protocol::Constant::CompletionItemKind::FILE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#26 -LanguageServer::Protocol::Constant::CompletionItemKind::FOLDER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#10 -LanguageServer::Protocol::Constant::CompletionItemKind::FUNCTION = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#15 -LanguageServer::Protocol::Constant::CompletionItemKind::INTERFACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#21 -LanguageServer::Protocol::Constant::CompletionItemKind::KEYWORD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#9 -LanguageServer::Protocol::Constant::CompletionItemKind::METHOD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#16 -LanguageServer::Protocol::Constant::CompletionItemKind::MODULE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#31 -LanguageServer::Protocol::Constant::CompletionItemKind::OPERATOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#17 -LanguageServer::Protocol::Constant::CompletionItemKind::PROPERTY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#25 -LanguageServer::Protocol::Constant::CompletionItemKind::REFERENCE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#22 -LanguageServer::Protocol::Constant::CompletionItemKind::SNIPPET = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#29 -LanguageServer::Protocol::Constant::CompletionItemKind::STRUCT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#8 -LanguageServer::Protocol::Constant::CompletionItemKind::TEXT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#32 -LanguageServer::Protocol::Constant::CompletionItemKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#18 -LanguageServer::Protocol::Constant::CompletionItemKind::UNIT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#19 -LanguageServer::Protocol::Constant::CompletionItemKind::VALUE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#13 -LanguageServer::Protocol::Constant::CompletionItemKind::VARIABLE = T.let(T.unsafe(nil), Integer) - -# Completion item tags are extra annotations that tweak the rendering of a -# completion item. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#8 -module LanguageServer::Protocol::Constant::CompletionItemTag; end - -# Render a completion as obsolete, usually using a strike-out. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#12 -LanguageServer::Protocol::Constant::CompletionItemTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# How a completion was triggered -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::CompletionTriggerKind; end - -# Completion was triggered by typing an identifier (24x7 code -# complete), manual invocation (e.g Ctrl+Space) or via API. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#12 -LanguageServer::Protocol::Constant::CompletionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# Completion was triggered by a trigger character specified by -# the `triggerCharacters` properties of the -# `CompletionRegistrationOptions`. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#18 -LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) - -# Completion was re-triggered as the current completion list is incomplete. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#22 -LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_FOR_INCOMPLETE_COMPLETIONS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#4 -module LanguageServer::Protocol::Constant::DiagnosticSeverity; end - -# Reports an error. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#8 -LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR = T.let(T.unsafe(nil), Integer) - -# Reports a hint. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#20 -LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT = T.let(T.unsafe(nil), Integer) - -# Reports an information. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#16 -LanguageServer::Protocol::Constant::DiagnosticSeverity::INFORMATION = T.let(T.unsafe(nil), Integer) - -# Reports a warning. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#12 -LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING = T.let(T.unsafe(nil), Integer) - -# The diagnostic tags. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#7 -module LanguageServer::Protocol::Constant::DiagnosticTag; end - -# Deprecated or obsolete code. -# -# Clients are allowed to rendered diagnostics with this tag strike through. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#20 -LanguageServer::Protocol::Constant::DiagnosticTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# Unused or unnecessary code. -# -# Clients are allowed to render diagnostics with this tag faded out -# instead of having an error squiggle. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#14 -LanguageServer::Protocol::Constant::DiagnosticTag::UNNECESSARY = T.let(T.unsafe(nil), Integer) - -# The document diagnostic report kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#7 -module LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind; end - -# A diagnostic report with a full -# set of problems. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#12 -LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::FULL = T.let(T.unsafe(nil), String) - -# A report indicating that the last -# returned report is still accurate. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#17 -LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::UNCHANGED = T.let(T.unsafe(nil), String) - -# A document highlight kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#7 -module LanguageServer::Protocol::Constant::DocumentHighlightKind; end - -# Read-access of a symbol, like reading a variable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#15 -LanguageServer::Protocol::Constant::DocumentHighlightKind::READ = T.let(T.unsafe(nil), Integer) - -# A textual occurrence. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#11 -LanguageServer::Protocol::Constant::DocumentHighlightKind::TEXT = T.let(T.unsafe(nil), Integer) - -# Write-access of a symbol, like writing to a variable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#19 -LanguageServer::Protocol::Constant::DocumentHighlightKind::WRITE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#4 -module LanguageServer::Protocol::Constant::ErrorCodes; end - -# The server detected that the content of a document got -# modified outside normal conditions. A server should -# NOT send this error code if it detects a content change -# in it unprocessed messages. The result even computed -# on an older state might still be useful for the client. -# -# If a client decides that a result is not of any use anymore -# the client should cancel the request. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#59 -LanguageServer::Protocol::Constant::ErrorCodes::CONTENT_MODIFIED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#9 -LanguageServer::Protocol::Constant::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#8 -LanguageServer::Protocol::Constant::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#6 -LanguageServer::Protocol::Constant::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) - -# This is the end range of JSON-RPC reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#29 -LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) - -# This is the start range of JSON-RPC reserved error codes. -# It doesn't denote a real error code. No LSP error codes should -# be defined between the start and end range. For backwards -# compatibility the `ServerNotInitialized` and the `UnknownErrorCode` -# are left in the range. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#17 -LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) - -# This is the end range of LSP reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#69 -LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) - -# This is the start range of LSP reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#35 -LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#7 -LanguageServer::Protocol::Constant::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#5 -LanguageServer::Protocol::Constant::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) - -# The client has canceled a request and a server as detected -# the cancel. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#64 -LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) - -# A request failed but it was syntactically correct, e.g the -# method name was known and the parameters were valid. The error -# message should contain human readable information about why -# the request failed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#42 -LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_FAILED = T.let(T.unsafe(nil), Integer) - -# The server cancelled the request. This error code should -# only be used for requests that explicitly support being -# server cancellable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#48 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_CANCELLED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#30 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#18 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) - -# Error code indicating that a server received a notification or -# request before the server has received the `initialize` request. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#23 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#24 -LanguageServer::Protocol::Constant::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#4 -module LanguageServer::Protocol::Constant::FailureHandlingKind; end - -# Applying the workspace change is simply aborted if one of the changes -# provided fails. All operations executed before the failing operation -# stay executed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#10 -LanguageServer::Protocol::Constant::FailureHandlingKind::ABORT = T.let(T.unsafe(nil), String) - -# If the workspace edit contains only textual file changes they are -# executed transactional. If resource changes (create, rename or delete -# file) are part of the change the failure handling strategy is abort. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#21 -LanguageServer::Protocol::Constant::FailureHandlingKind::TEXT_ONLY_TRANSACTIONAL = T.let(T.unsafe(nil), String) - -# All operations are executed transactional. That means they either all -# succeed or no changes at all are applied to the workspace. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#15 -LanguageServer::Protocol::Constant::FailureHandlingKind::TRANSACTIONAL = T.let(T.unsafe(nil), String) - -# The client tries to undo the operations already executed. But there is no -# guarantee that this is succeeding. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#26 -LanguageServer::Protocol::Constant::FailureHandlingKind::UNDO = T.let(T.unsafe(nil), String) - -# The file event type. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#7 -module LanguageServer::Protocol::Constant::FileChangeType; end - -# The file got changed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#15 -LanguageServer::Protocol::Constant::FileChangeType::CHANGED = T.let(T.unsafe(nil), Integer) - -# The file got created. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#11 -LanguageServer::Protocol::Constant::FileChangeType::CREATED = T.let(T.unsafe(nil), Integer) - -# The file got deleted. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#19 -LanguageServer::Protocol::Constant::FileChangeType::DELETED = T.let(T.unsafe(nil), Integer) - -# A pattern kind describing if a glob pattern matches a file a folder or -# both. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#8 -module LanguageServer::Protocol::Constant::FileOperationPatternKind; end - -# The pattern matches a file only. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#12 -LanguageServer::Protocol::Constant::FileOperationPatternKind::FILE = T.let(T.unsafe(nil), String) - -# The pattern matches a folder only. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#16 -LanguageServer::Protocol::Constant::FileOperationPatternKind::FOLDER = T.let(T.unsafe(nil), String) - -# A set of predefined range kinds. -# The type is a string since the value set is extensible -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#8 -module LanguageServer::Protocol::Constant::FoldingRangeKind; end - -# Folding range for a comment -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#12 -LanguageServer::Protocol::Constant::FoldingRangeKind::COMMENT = T.let(T.unsafe(nil), String) - -# Folding range for imports or includes -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#16 -LanguageServer::Protocol::Constant::FoldingRangeKind::IMPORTS = T.let(T.unsafe(nil), String) - -# Folding range for a region (e.g. `#region`) -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#20 -LanguageServer::Protocol::Constant::FoldingRangeKind::REGION = T.let(T.unsafe(nil), String) - -# Known error codes for an `InitializeErrorCodes`; -# -# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#7 -module LanguageServer::Protocol::Constant::InitializeErrorCodes; end - -# If the protocol version provided by the client can't be handled by -# the server. -# -# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#12 -LanguageServer::Protocol::Constant::InitializeErrorCodes::UNKNOWN_PROTOCOL_VERSION = T.let(T.unsafe(nil), Integer) - -# Inlay hint kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#7 -module LanguageServer::Protocol::Constant::InlayHintKind; end - -# An inlay hint that is for a parameter. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#15 -LanguageServer::Protocol::Constant::InlayHintKind::PARAMETER = T.let(T.unsafe(nil), Integer) - -# An inlay hint that for a type annotation. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#11 -LanguageServer::Protocol::Constant::InlayHintKind::TYPE = T.let(T.unsafe(nil), Integer) - -# Defines whether the insert text in a completion item should be interpreted as -# plain text or a snippet. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#8 -module LanguageServer::Protocol::Constant::InsertTextFormat; end - -# The primary text to be inserted is treated as a plain string. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#12 -LanguageServer::Protocol::Constant::InsertTextFormat::PLAIN_TEXT = T.let(T.unsafe(nil), Integer) - -# The primary text to be inserted is treated as a snippet. -# -# A snippet can define tab stops and placeholders with `$1`, `$2` -# and `${3:foo}`. `$0` defines the final tab stop, it defaults to -# the end of the snippet. Placeholders with equal identifiers are linked, -# that is typing in one will update others too. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#21 -LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET = T.let(T.unsafe(nil), Integer) - -# How whitespace and indentation is handled during completion -# item insertion. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#8 -module LanguageServer::Protocol::Constant::InsertTextMode; end - -# The editor adjusts leading whitespace of new lines so that -# they match the indentation up to the cursor of the line for -# which the item is accepted. -# -# Consider a line like this: <2tabs><3tabs>foo. Accepting a -# multi line completion item is indented using 2 tabs and all -# following lines inserted will be indented using 2 tabs as well. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#26 -LanguageServer::Protocol::Constant::InsertTextMode::ADJUST_INDENTATION = T.let(T.unsafe(nil), Integer) - -# The insertion or replace strings is taken as it is. If the -# value is multi line the lines below the cursor will be -# inserted using the indentation defined in the string value. -# The client will not apply any kind of adjustments to the -# string. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#16 -LanguageServer::Protocol::Constant::InsertTextMode::AS_IS = T.let(T.unsafe(nil), Integer) - -# Describes the content type that a client supports in various -# result literals like `Hover`, `ParameterInfo` or `CompletionItem`. -# -# Please note that `MarkupKinds` must not start with a `$`. This kinds -# are reserved for internal usage. -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#11 -module LanguageServer::Protocol::Constant::MarkupKind; end - -# Markdown is supported as a content format -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#19 -LanguageServer::Protocol::Constant::MarkupKind::MARKDOWN = T.let(T.unsafe(nil), String) - -# Plain text is supported as a content format -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#15 -LanguageServer::Protocol::Constant::MarkupKind::PLAIN_TEXT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#4 -module LanguageServer::Protocol::Constant::MessageType; end - -# An error message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#8 -LanguageServer::Protocol::Constant::MessageType::ERROR = T.let(T.unsafe(nil), Integer) - -# An information message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#16 -LanguageServer::Protocol::Constant::MessageType::INFO = T.let(T.unsafe(nil), Integer) - -# A log message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#20 -LanguageServer::Protocol::Constant::MessageType::LOG = T.let(T.unsafe(nil), Integer) - -# A warning message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#12 -LanguageServer::Protocol::Constant::MessageType::WARNING = T.let(T.unsafe(nil), Integer) - -# The moniker kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#7 -module LanguageServer::Protocol::Constant::MonikerKind; end - -# The moniker represents a symbol that is exported from a project -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#15 -LanguageServer::Protocol::Constant::MonikerKind::EXPORT = T.let(T.unsafe(nil), String) - -# The moniker represent a symbol that is imported into a project -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#11 -LanguageServer::Protocol::Constant::MonikerKind::IMPORT = T.let(T.unsafe(nil), String) - -# The moniker represents a symbol that is local to a project (e.g. a local -# variable of a function, a class not visible outside the project, ...) -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#20 -LanguageServer::Protocol::Constant::MonikerKind::LOCAL = T.let(T.unsafe(nil), String) - -# A notebook cell kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#7 -module LanguageServer::Protocol::Constant::NotebookCellKind; end - -# A code-cell is source code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#15 -LanguageServer::Protocol::Constant::NotebookCellKind::CODE = T.let(T.unsafe(nil), Integer) - -# A markup-cell is formatted source that is used for display. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#11 -LanguageServer::Protocol::Constant::NotebookCellKind::MARKUP = T.let(T.unsafe(nil), Integer) - -# A type indicating how positions are encoded, -# specifically what column offsets mean. -# A set of predefined position encoding kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#9 -module LanguageServer::Protocol::Constant::PositionEncodingKind; end - -# Character offsets count UTF-16 code units. -# -# This is the default and must always be supported -# by servers -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#20 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF16 = T.let(T.unsafe(nil), String) - -# Character offsets count UTF-32 code units. -# -# Implementation note: these are the same as Unicode code points, -# so this `PositionEncodingKind` may also be used for an -# encoding-agnostic representation of character offsets. -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#28 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF32 = T.let(T.unsafe(nil), String) - -# Character offsets count UTF-8 code units (e.g bytes). -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#13 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF8 = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#4 -module LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior; end - -# The client's default behavior is to select the identifier -# according to the language's syntax rule. -# -# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#9 -LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior::IDENTIFIER = T.let(T.unsafe(nil), Integer) - -# The kind of resource operations supported by the client. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#7 -module LanguageServer::Protocol::Constant::ResourceOperationKind; end - -# Supports creating new files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#11 -LanguageServer::Protocol::Constant::ResourceOperationKind::CREATE = T.let(T.unsafe(nil), String) - -# Supports deleting existing files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#19 -LanguageServer::Protocol::Constant::ResourceOperationKind::DELETE = T.let(T.unsafe(nil), String) - -# Supports renaming existing files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#15 -LanguageServer::Protocol::Constant::ResourceOperationKind::RENAME = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#4 -module LanguageServer::Protocol::Constant::SemanticTokenModifiers; end - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#10 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::ABSTRACT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#11 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::ASYNC = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#5 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DECLARATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#14 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFAULT_LIBRARY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#6 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFINITION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#9 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEPRECATED = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#13 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DOCUMENTATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#12 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::MODIFICATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#7 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::READONLY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#8 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::STATIC = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#4 -module LanguageServer::Protocol::Constant::SemanticTokenTypes; end - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#11 -LanguageServer::Protocol::Constant::SemanticTokenTypes::CLASS = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#26 -LanguageServer::Protocol::Constant::SemanticTokenTypes::COMMENT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#31 -LanguageServer::Protocol::Constant::SemanticTokenTypes::DECORATOR = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#12 -LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#19 -LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM_MEMBER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#20 -LanguageServer::Protocol::Constant::SemanticTokenTypes::EVENT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#21 -LanguageServer::Protocol::Constant::SemanticTokenTypes::FUNCTION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#13 -LanguageServer::Protocol::Constant::SemanticTokenTypes::INTERFACE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#24 -LanguageServer::Protocol::Constant::SemanticTokenTypes::KEYWORD = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#23 -LanguageServer::Protocol::Constant::SemanticTokenTypes::MACRO = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#22 -LanguageServer::Protocol::Constant::SemanticTokenTypes::METHOD = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#25 -LanguageServer::Protocol::Constant::SemanticTokenTypes::MODIFIER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#5 -LanguageServer::Protocol::Constant::SemanticTokenTypes::NAMESPACE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#28 -LanguageServer::Protocol::Constant::SemanticTokenTypes::NUMBER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#30 -LanguageServer::Protocol::Constant::SemanticTokenTypes::OPERATOR = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#16 -LanguageServer::Protocol::Constant::SemanticTokenTypes::PARAMETER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#18 -LanguageServer::Protocol::Constant::SemanticTokenTypes::PROPERTY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#29 -LanguageServer::Protocol::Constant::SemanticTokenTypes::REGEXP = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#27 -LanguageServer::Protocol::Constant::SemanticTokenTypes::STRING = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#14 -LanguageServer::Protocol::Constant::SemanticTokenTypes::STRUCT = T.let(T.unsafe(nil), String) - -# Represents a generic type. Acts as a fallback for types which -# can't be mapped to a specific type like class or enum. -# -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#10 -LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#15 -LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE_PARAMETER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#17 -LanguageServer::Protocol::Constant::SemanticTokenTypes::VARIABLE = T.let(T.unsafe(nil), String) - -# How a signature help was triggered. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::SignatureHelpTriggerKind; end - -# Signature help was triggered by the cursor moving or by the document -# content changing. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#20 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::CONTENT_CHANGE = T.let(T.unsafe(nil), Integer) - -# Signature help was invoked manually by the user or by a command. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#11 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# Signature help was triggered by a trigger character. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#15 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) - -# A symbol kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#7 -module LanguageServer::Protocol::Constant::SymbolKind; end - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#25 -LanguageServer::Protocol::Constant::SymbolKind::ARRAY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#24 -LanguageServer::Protocol::Constant::SymbolKind::BOOLEAN = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#12 -LanguageServer::Protocol::Constant::SymbolKind::CLASS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#21 -LanguageServer::Protocol::Constant::SymbolKind::CONSTANT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#16 -LanguageServer::Protocol::Constant::SymbolKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#17 -LanguageServer::Protocol::Constant::SymbolKind::ENUM = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#29 -LanguageServer::Protocol::Constant::SymbolKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#31 -LanguageServer::Protocol::Constant::SymbolKind::EVENT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#15 -LanguageServer::Protocol::Constant::SymbolKind::FIELD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#8 -LanguageServer::Protocol::Constant::SymbolKind::FILE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#19 -LanguageServer::Protocol::Constant::SymbolKind::FUNCTION = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#18 -LanguageServer::Protocol::Constant::SymbolKind::INTERFACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#27 -LanguageServer::Protocol::Constant::SymbolKind::KEY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#13 -LanguageServer::Protocol::Constant::SymbolKind::METHOD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#9 -LanguageServer::Protocol::Constant::SymbolKind::MODULE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#10 -LanguageServer::Protocol::Constant::SymbolKind::NAMESPACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#28 -LanguageServer::Protocol::Constant::SymbolKind::NULL = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#23 -LanguageServer::Protocol::Constant::SymbolKind::NUMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#26 -LanguageServer::Protocol::Constant::SymbolKind::OBJECT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#32 -LanguageServer::Protocol::Constant::SymbolKind::OPERATOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#11 -LanguageServer::Protocol::Constant::SymbolKind::PACKAGE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#14 -LanguageServer::Protocol::Constant::SymbolKind::PROPERTY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#22 -LanguageServer::Protocol::Constant::SymbolKind::STRING = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#30 -LanguageServer::Protocol::Constant::SymbolKind::STRUCT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#33 -LanguageServer::Protocol::Constant::SymbolKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#20 -LanguageServer::Protocol::Constant::SymbolKind::VARIABLE = T.let(T.unsafe(nil), Integer) - -# Symbol tags are extra annotations that tweak the rendering of a symbol. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#7 -module LanguageServer::Protocol::Constant::SymbolTag; end - -# Render a symbol as obsolete, usually using a strike-out. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#11 -LanguageServer::Protocol::Constant::SymbolTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# Represents reasons why a text document is saved. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#7 -module LanguageServer::Protocol::Constant::TextDocumentSaveReason; end - -# Automatic after a delay. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#16 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::AFTER_DELAY = T.let(T.unsafe(nil), Integer) - -# When the editor lost focus. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#20 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::FOCUS_OUT = T.let(T.unsafe(nil), Integer) - -# Manually triggered, e.g. by the user pressing save, by starting -# debugging, or by an API call. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#12 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::MANUAL = T.let(T.unsafe(nil), Integer) - -# Defines how the host (editor) should sync document changes to the language -# server. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#8 -module LanguageServer::Protocol::Constant::TextDocumentSyncKind; end - -# Documents are synced by always sending the full content -# of the document. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#17 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::FULL = T.let(T.unsafe(nil), Integer) - -# Documents are synced by sending the full content on open. -# After that only incremental updates to the document are -# sent. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#23 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::INCREMENTAL = T.let(T.unsafe(nil), Integer) - -# Documents should not be synced at all. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#12 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::NONE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#4 -module LanguageServer::Protocol::Constant::TokenFormat; end - -# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#5 -LanguageServer::Protocol::Constant::TokenFormat::RELATIVE = T.let(T.unsafe(nil), String) - -# Moniker uniqueness level to define scope of the moniker. -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#7 -module LanguageServer::Protocol::Constant::UniquenessLevel; end - -# The moniker is only unique inside a document -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#11 -LanguageServer::Protocol::Constant::UniquenessLevel::DOCUMENT = T.let(T.unsafe(nil), String) - -# The moniker is globally unique -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#27 -LanguageServer::Protocol::Constant::UniquenessLevel::GLOBAL = T.let(T.unsafe(nil), String) - -# The moniker is unique inside the group to which a project belongs -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#19 -LanguageServer::Protocol::Constant::UniquenessLevel::GROUP = T.let(T.unsafe(nil), String) - -# The moniker is unique inside a project for which a dump got created -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#15 -LanguageServer::Protocol::Constant::UniquenessLevel::PROJECT = T.let(T.unsafe(nil), String) - -# The moniker is unique inside the moniker scheme. -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#23 -LanguageServer::Protocol::Constant::UniquenessLevel::SCHEME = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#4 -module LanguageServer::Protocol::Constant::WatchKind; end - -# Interested in change events -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#12 -LanguageServer::Protocol::Constant::WatchKind::CHANGE = T.let(T.unsafe(nil), Integer) - -# Interested in create events. -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#8 -LanguageServer::Protocol::Constant::WatchKind::CREATE = T.let(T.unsafe(nil), Integer) - -# Interested in delete events -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#16 -LanguageServer::Protocol::Constant::WatchKind::DELETE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/interface.rb#3 -module LanguageServer::Protocol::Interface; end - -# A special text edit with an additional change annotation. -# -# source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#7 -class LanguageServer::Protocol::Interface::AnnotatedTextEdit - # @return [AnnotatedTextEdit] a new instance of AnnotatedTextEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#8 - def initialize(range:, new_text:, annotation_id:); end - - # The actual annotation identifier. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#40 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#44 - def attributes; end - - # The string to be inserted. For delete operations use an - # empty string. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#32 - def new_text; end - - # The range of the text document to be manipulated. To insert - # text into a document create a range where start === end. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#23 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#4 -class LanguageServer::Protocol::Interface::ApplyWorkspaceEditParams - # @return [ApplyWorkspaceEditParams] a new instance of ApplyWorkspaceEditParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#5 - def initialize(edit:, label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#32 - def attributes; end - - # The edits to apply. - # - # @return [WorkspaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#28 - def edit; end - - # An optional label of the workspace edit. This label is - # presented in the user interface for example on an undo - # stack to undo the workspace edit. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#20 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#4 -class LanguageServer::Protocol::Interface::ApplyWorkspaceEditResult - # @return [ApplyWorkspaceEditResult] a new instance of ApplyWorkspaceEditResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#5 - def initialize(applied:, failure_reason: T.unsafe(nil), failed_change: T.unsafe(nil)); end - - # Indicates whether the edit was applied or not. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#19 - def applied; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#44 - def attributes; end - - # Depending on the client's failure handling strategy `failedChange` - # might contain the index of the change that failed. This property is - # only available if the client signals a `failureHandling` strategy - # in its client capabilities. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#40 - def failed_change; end - - # An optional textual description for why the edit was not applied. - # This may be used by the server for diagnostic logging or to provide - # a suitable error for a request that triggered the edit. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#29 - def failure_reason; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyClientCapabilities - # @return [CallHierarchyClientCapabilities] a new instance of CallHierarchyClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyIncomingCall - # @return [CallHierarchyIncomingCall] a new instance of CallHierarchyIncomingCall - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#5 - def initialize(from:, from_ranges:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#31 - def attributes; end - - # The item that makes the call. - # - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#18 - def from; end - - # The ranges at which the calls appear. This is relative to the caller - # denoted by [`this.from`](#CallHierarchyIncomingCall.from). - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#27 - def from_ranges; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyIncomingCallsParams - # @return [CallHierarchyIncomingCallsParams] a new instance of CallHierarchyIncomingCallsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#37 - def attributes; end - - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyItem - # @return [CallHierarchyItem] a new instance of CallHierarchyItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#5 - def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#88 - def attributes; end - - # A data entry field that is preserved between a call hierarchy prepare and - # incoming calls or outgoing calls requests. - # - # @return [unknown] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#84 - def data; end - - # More detail for this item, e.g. the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#48 - def detail; end - - # The kind of this item. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#32 - def kind; end - - # The name of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#24 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else, e.g. comments and code. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#65 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the - # [`range`](#CallHierarchyItem.range). - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#75 - def selection_range; end - - # Tags for this item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#40 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#90 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#94 - def to_json(*args); end - - # The resource identifier of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#56 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOptions - # @return [CallHierarchyOptions] a new instance of CallHierarchyOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall - # @return [CallHierarchyOutgoingCall] a new instance of CallHierarchyOutgoingCall - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#5 - def initialize(to:, from_ranges:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#31 - def attributes; end - - # The range at which this item is called. This is the range relative to - # the caller, e.g the item passed to `callHierarchy/outgoingCalls` request. - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#27 - def from_ranges; end - - # The item that is called. - # - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#18 - def to; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCallsParams - # @return [CallHierarchyOutgoingCallsParams] a new instance of CallHierarchyOutgoingCallsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#37 - def attributes; end - - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyPrepareParams - # @return [CallHierarchyPrepareParams] a new instance of CallHierarchyPrepareParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyRegistrationOptions - # @return [CallHierarchyRegistrationOptions] a new instance of CallHierarchyRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#4 -class LanguageServer::Protocol::Interface::CancelParams - # @return [CancelParams] a new instance of CancelParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#5 - def initialize(id:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#21 - def attributes; end - - # The request id to cancel. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#17 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#27 - def to_json(*args); end -end - -# Additional information that describes document changes. -# -# source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#7 -class LanguageServer::Protocol::Interface::ChangeAnnotation - # @return [ChangeAnnotation] a new instance of ChangeAnnotation - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#8 - def initialize(label:, needs_confirmation: T.unsafe(nil), description: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#45 - def attributes; end - - # A human-readable string which is rendered less prominent in - # the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#41 - def description; end - - # A human-readable string describing the actual change. The string - # is rendered prominent in the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#23 - def label; end - - # A flag which indicates that user confirmation is needed - # before applying the change. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#32 - def needs_confirmation; end - - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ClientCapabilities - # @return [ClientCapabilities] a new instance of ClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#5 - def initialize(workspace: T.unsafe(nil), text_document: T.unsafe(nil), notebook_document: T.unsafe(nil), window: T.unsafe(nil), general: T.unsafe(nil), experimental: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#66 - def attributes; end - - # Experimental client capabilities. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#62 - def experimental; end - - # General client capabilities. - # - # @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#54 - def general; end - - # Capabilities specific to the notebook document support. - # - # @return [NotebookDocumentClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#38 - def notebook_document; end - - # Text document specific client capabilities. - # - # @return [TextDocumentClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#30 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#72 - def to_json(*args); end - - # Window specific client capabilities. - # - # @return [{ workDoneProgress?: boolean; showMessage?: ShowMessageRequestClientCapabilities; showDocument?: ShowDocumentClientCapabilities; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#46 - def window; end - - # Workspace specific client capabilities. - # - # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#22 - def workspace; end -end - -# A code action represents a change that can be performed in code, e.g. to fix -# a problem or to refactor code. -# -# A CodeAction must set either `edit` and/or a `command`. If both are supplied, -# the `edit` is applied first, then the `command` is executed. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#11 -class LanguageServer::Protocol::Interface::CodeAction - # @return [CodeAction] a new instance of CodeAction - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#12 - def initialize(title:, kind: T.unsafe(nil), diagnostics: T.unsafe(nil), is_preferred: T.unsafe(nil), disabled: T.unsafe(nil), edit: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#115 - def attributes; end - - # A command this code action executes. If a code action - # provides an edit and a command, first the edit is - # executed and then the command. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#102 - def command; end - - # A data entry field that is preserved on a code action between - # a `textDocument/codeAction` and a `codeAction/resolve` request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#111 - def data; end - - # The diagnostics that this code action resolves. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#49 - def diagnostics; end - - # Marks that the code action cannot currently be applied. - # - # Clients should follow the following guidelines regarding disabled code - # actions: - # - # - Disabled code actions are not shown in automatic lightbulbs code - # action menus. - # - # - Disabled actions are shown as faded out in the code action menu when - # the user request a more specific type of code action, such as - # refactorings. - # - # - If the user has a keybinding that auto applies a code action and only - # a disabled code actions are returned, the client should show the user - # an error message with `reason` in the editor. - # - # @return [{ reason: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#84 - def disabled; end - - # The workspace edit this code action performs. - # - # @return [WorkspaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#92 - def edit; end - - # Marks this as a preferred action. Preferred actions are used by the - # `auto fix` command and can be targeted by keybindings. - # - # A quick fix should be marked preferred if it properly addresses the - # underlying error. A refactoring should be marked preferred if it is the - # most reasonable choice of actions to take. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#62 - def is_preferred; end - - # The kind of the code action. - # - # Used to filter code actions. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#41 - def kind; end - - # A short, human-readable, title for this code action. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#31 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#117 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#121 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeActionClientCapabilities - # @return [CodeActionClientCapabilities] a new instance of CodeActionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), code_action_literal_support: T.unsafe(nil), is_preferred_support: T.unsafe(nil), disabled_support: T.unsafe(nil), data_support: T.unsafe(nil), resolve_support: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#83 - def attributes; end - - # The client supports code action literals as a valid - # response of the `textDocument/codeAction` request. - # - # @return [{ codeActionKind: { valueSet: string[]; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#32 - def code_action_literal_support; end - - # Whether code action supports the `data` property which is - # preserved between a `textDocument/codeAction` and a - # `codeAction/resolve` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#58 - def data_support; end - - # Whether code action supports the `disabled` property. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#48 - def disabled_support; end - - # Whether code action supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#23 - def dynamic_registration; end - - # Whether the client honors the change annotations in - # text edits and resource operations returned via the - # `CodeAction#edit` property by for example presenting - # the workspace edit in the user interface and asking - # for confirmation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#79 - def honors_change_annotations; end - - # Whether code action supports the `isPreferred` property. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#40 - def is_preferred_support; end - - # Whether the client supports resolving additional code action - # properties via a separate `codeAction/resolve` request. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#67 - def resolve_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#85 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#89 - def to_json(*args); end -end - -# Contains additional diagnostic information about the context in which -# a code action is run. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#8 -class LanguageServer::Protocol::Interface::CodeActionContext - # @return [CodeActionContext] a new instance of CodeActionContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#9 - def initialize(diagnostics:, only: T.unsafe(nil), trigger_kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#51 - def attributes; end - - # An array of diagnostics known on the client side overlapping the range - # provided to the `textDocument/codeAction` request. They are provided so - # that the server knows which errors are currently presented to the user - # for the given range. There is no guarantee that these accurately reflect - # the error state of the resource. The primary parameter - # to compute code actions is the provided range. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#28 - def diagnostics; end - - # Requested kind of actions to return. - # - # Actions not of this kind are filtered out by the client before being - # shown. So servers can omit computing them. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#39 - def only; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#57 - def to_json(*args); end - - # The reason why code actions were requested. - # - # @return [CodeActionTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#47 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#4 -class LanguageServer::Protocol::Interface::CodeActionOptions - # @return [CodeActionOptions] a new instance of CodeActionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#40 - def attributes; end - - # CodeActionKinds that this server may return. - # - # The list of kinds may be generic, such as `CodeActionKind.Refactor`, - # or the server may list out every specific kind they provide. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#27 - def code_action_kinds; end - - # The server provides support to resolve additional - # information for a code action. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#36 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#46 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#16 - def work_done_progress; end -end - -# Params for the CodeActionRequest -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#7 -class LanguageServer::Protocol::Interface::CodeActionParams - # @return [CodeActionParams] a new instance of CodeActionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#8 - def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#61 - def attributes; end - - # Context carrying additional information. - # - # @return [CodeActionContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#57 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#33 - def partial_result_token; end - - # The range for which the command was invoked. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#49 - def range; end - - # The document in which the command was invoked. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#41 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#67 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#24 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CodeActionRegistrationOptions - # @return [CodeActionRegistrationOptions] a new instance of CodeActionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#50 - def attributes; end - - # CodeActionKinds that this server may return. - # - # The list of kinds may be generic, such as `CodeActionKind.Refactor`, - # or the server may list out every specific kind they provide. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#37 - def code_action_kinds; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#21 - def document_selector; end - - # The server provides support to resolve additional - # information for a code action. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#46 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#56 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#26 - def work_done_progress; end -end - -# Structure to capture a description for an error code. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#7 -class LanguageServer::Protocol::Interface::CodeDescription - # @return [CodeDescription] a new instance of CodeDescription - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#8 - def initialize(href:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#24 - def attributes; end - - # An URI to open with more information about the diagnostic error. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#20 - def href; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#30 - def to_json(*args); end -end - -# A code lens represents a command that should be shown along with -# source text, like the number of references, a way to run tests, etc. -# -# A code lens is _unresolved_ when no command is associated to it. For -# performance reasons the creation of a code lens and resolving should be done -# in two stages. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#12 -class LanguageServer::Protocol::Interface::CodeLens - # @return [CodeLens] a new instance of CodeLens - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#13 - def initialize(range:, command: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#49 - def attributes; end - - # The command this code lens represents. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#36 - def command; end - - # A data entry field that is preserved on a code lens item between - # a code lens and a code lens resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#45 - def data; end - - # The range in which this code lens is valid. Should only span a single - # line. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#28 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#55 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeLensClientCapabilities - # @return [CodeLensClientCapabilities] a new instance of CodeLensClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#21 - def attributes; end - - # Whether code lens supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#4 -class LanguageServer::Protocol::Interface::CodeLensOptions - # @return [CodeLensOptions] a new instance of CodeLensOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#27 - def attributes; end - - # Code lens has a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#23 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#4 -class LanguageServer::Protocol::Interface::CodeLensParams - # @return [CodeLensParams] a new instance of CodeLensParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#28 - def partial_result_token; end - - # The document to request code lens for. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CodeLensRegistrationOptions - # @return [CodeLensRegistrationOptions] a new instance of CodeLensRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#20 - def document_selector; end - - # Code lens has a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#33 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeLensWorkspaceClientCapabilities - # @return [CodeLensWorkspaceClientCapabilities] a new instance of CodeLensWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#5 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#27 - def attributes; end - - # Whether the client implementation supports a refresh request sent from the - # server to the client. - # - # Note that this event is global and will force the client to refresh all - # code lenses currently shown. It should be used with absolute care and is - # useful for situation where a server for example detect a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#23 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#33 - def to_json(*args); end -end - -# Represents a color in RGBA space. -# -# source://language_server-protocol//lib/language_server/protocol/interface/color.rb#7 -class LanguageServer::Protocol::Interface::Color - # @return [Color] a new instance of Color - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#8 - def initialize(red:, green:, blue:, alpha:); end - - # The alpha component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#47 - def alpha; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#51 - def attributes; end - - # The blue component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#39 - def blue; end - - # The green component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#31 - def green; end - - # The red component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#23 - def red; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#57 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#4 -class LanguageServer::Protocol::Interface::ColorInformation - # @return [ColorInformation] a new instance of ColorInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#5 - def initialize(range:, color:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#30 - def attributes; end - - # The actual color value for this color range. - # - # @return [Color] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#26 - def color; end - - # The range in the document where this color appears. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#18 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#4 -class LanguageServer::Protocol::Interface::ColorPresentation - # @return [ColorPresentation] a new instance of ColorPresentation - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#5 - def initialize(label:, text_edit: T.unsafe(nil), additional_text_edits: T.unsafe(nil)); end - - # An optional array of additional [text edits](#TextEdit) that are applied - # when selecting this color presentation. Edits must not overlap with the - # main [edit](#ColorPresentation.textEdit) nor with themselves. - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#41 - def additional_text_edits; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#45 - def attributes; end - - # The label of this color presentation. It will be shown on the color - # picker header. By default this is also the text that is inserted when - # selecting this color presentation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#21 - def label; end - - # An [edit](#TextEdit) which is applied to a document when selecting - # this presentation for the color. When `falsy` the - # [label](#ColorPresentation.label) is used. - # - # @return [TextEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#31 - def text_edit; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#4 -class LanguageServer::Protocol::Interface::ColorPresentationParams - # @return [ColorPresentationParams] a new instance of ColorPresentationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#5 - def initialize(text_document:, color:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#58 - def attributes; end - - # The color information to request presentations for. - # - # @return [Color] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#46 - def color; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#30 - def partial_result_token; end - - # The range where the color would be inserted. Serves as a context. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#54 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#38 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#64 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#21 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/command.rb#4 -class LanguageServer::Protocol::Interface::Command - # @return [Command] a new instance of Command - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#5 - def initialize(title:, command:, arguments: T.unsafe(nil)); end - - # Arguments that the command handler should be - # invoked with. - # - # @return [LSPAny[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#36 - def arguments; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#40 - def attributes; end - - # The identifier of the actual command handler. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#27 - def command; end - - # Title of the command, like `save`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#19 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CompletionClientCapabilities - # @return [CompletionClientCapabilities] a new instance of CompletionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), completion_item: T.unsafe(nil), completion_item_kind: T.unsafe(nil), context_support: T.unsafe(nil), insert_text_mode: T.unsafe(nil), completion_list: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#67 - def attributes; end - - # The client supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#31 - def completion_item; end - - # @return [{ valueSet?: CompletionItemKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#36 - def completion_item_kind; end - - # The client supports the following `CompletionList` specific - # capabilities. - # - # @return [{ itemDefaults?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#63 - def completion_list; end - - # The client supports to send additional context information for a - # `textDocument/completion` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#45 - def context_support; end - - # Whether completion supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#22 - def dynamic_registration; end - - # The client's default when the completion item doesn't provide a - # `insertTextMode` property. - # - # @return [InsertTextMode] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#54 - def insert_text_mode; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#73 - def to_json(*args); end -end - -# Contains additional information about the context in which a completion -# request is triggered. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#8 -class LanguageServer::Protocol::Interface::CompletionContext - # @return [CompletionContext] a new instance of CompletionContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#9 - def initialize(trigger_kind:, trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#36 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#42 - def to_json(*args); end - - # The trigger character (a single character) that has trigger code - # complete. Is undefined if - # `triggerKind !== CompletionTriggerKind.TriggerCharacter` - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#32 - def trigger_character; end - - # How the completion was triggered. - # - # @return [CompletionTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#22 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#4 -class LanguageServer::Protocol::Interface::CompletionItem - # @return [CompletionItem] a new instance of CompletionItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#5 - def initialize(label:, label_details: T.unsafe(nil), kind: T.unsafe(nil), tags: T.unsafe(nil), detail: T.unsafe(nil), documentation: T.unsafe(nil), deprecated: T.unsafe(nil), preselect: T.unsafe(nil), sort_text: T.unsafe(nil), filter_text: T.unsafe(nil), insert_text: T.unsafe(nil), insert_text_format: T.unsafe(nil), insert_text_mode: T.unsafe(nil), text_edit: T.unsafe(nil), text_edit_text: T.unsafe(nil), additional_text_edits: T.unsafe(nil), commit_characters: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end - - # An optional array of additional text edits that are applied when - # selecting this completion. Edits must not overlap (including the same - # insert position) with the main edit nor with themselves. - # - # Additional text edits should be used to change text unrelated to the - # current cursor position (for example adding an import statement at the - # top of the file if the completion item will insert an unqualified type). - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#221 - def additional_text_edits; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#255 - def attributes; end - - # An optional command that is executed *after* inserting this completion. - # *Note* that additional modifications to the current document should be - # described with the additionalTextEdits-property. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#242 - def command; end - - # An optional set of characters that when pressed while this completion is - # active will accept it first and then type that character. *Note* that all - # commit characters should have `length=1` and that superfluous characters - # will be ignored. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#232 - def commit_characters; end - - # A data entry field that is preserved on a completion item between - # a completion and a completion resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#251 - def data; end - - # Indicates if this item is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#92 - def deprecated; end - - # A human-readable string with additional information - # about this item, like type or symbol information. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#76 - def detail; end - - # A human-readable string that represents a doc-comment. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#84 - def documentation; end - - # A string that should be used when filtering a set of - # completion items. When `falsy` the label is used as the - # filter text for this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#124 - def filter_text; end - - # A string that should be inserted into a document when selecting - # this completion. When `falsy` the label is used as the insert text - # for this item. - # - # The `insertText` is subject to interpretation by the client side. - # Some tools might not take the string literally. For example - # VS Code when code complete is requested in this example - # `con` and a completion item with an `insertText` of - # `console` is provided it will only insert `sole`. Therefore it is - # recommended to use `textEdit` instead since it avoids additional client - # side interpretation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#142 - def insert_text; end - - # The format of the insert text. The format applies to both the - # `insertText` property and the `newText` property of a provided - # `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. - # - # Please note that the insertTextFormat doesn't apply to - # `additionalTextEdits`. - # - # @return [InsertTextFormat] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#155 - def insert_text_format; end - - # How whitespace and indentation is handled during completion - # item insertion. If not provided the client's default value depends on - # the `textDocument.completion.insertTextMode` client capability. - # - # @return [InsertTextMode] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#165 - def insert_text_mode; end - - # The kind of this completion item. Based of the kind - # an icon is chosen by the editor. The standardized set - # of available values is defined in `CompletionItemKind`. - # - # @return [CompletionItemKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#59 - def kind; end - - # The label of this completion item. - # - # The label property is also by default the text that - # is inserted when selecting this completion. - # - # If label details are provided the label itself should - # be an unqualified name of the completion item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#41 - def label; end - - # Additional details for the label - # - # @return [CompletionItemLabelDetails] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#49 - def label_details; end - - # Select this item when showing. - # - # *Note* that only one completion item can be selected and that the - # tool / client decides which item that is. The rule is that the *first* - # item of those that match best is selected. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#104 - def preselect; end - - # A string that should be used when comparing this item - # with other items. When `falsy` the label is used - # as the sort text for this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#114 - def sort_text; end - - # Tags for this completion item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#67 - def tags; end - - # An edit which is applied to a document when selecting this completion. - # When an edit is provided the value of `insertText` is ignored. - # - # *Note:* The range of the edit must be a single line range and it must - # contain the position at which completion has been requested. - # - # Most editors support two different operations when accepting a completion - # item. One is to insert a completion text and the other is to replace an - # existing text with a completion text. Since this can usually not be - # predetermined by a server it can report both ranges. Clients need to - # signal support for `InsertReplaceEdit`s via the - # `textDocument.completion.completionItem.insertReplaceSupport` client - # capability property. - # - # *Note 1:* The text edit's range as well as both ranges from an insert - # replace edit must be a [single line] and they must contain the position - # at which completion has been requested. - # *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range - # must be a prefix of the edit's replace range, that means it must be - # contained and starting at the same position. - # - # @return [TextEdit | InsertReplaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#192 - def text_edit; end - - # The edit text used if the completion item is part of a CompletionList and - # CompletionList defines an item default for the text edit range. - # - # Clients will only honor this property if they opt into completion list - # item defaults using the capability `completionList.itemDefaults`. - # - # If not provided and a list's default range is provided the label - # property is used as a text. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#207 - def text_edit_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#257 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#261 - def to_json(*args); end -end - -# Additional details for a completion item label. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#7 -class LanguageServer::Protocol::Interface::CompletionItemLabelDetails - # @return [CompletionItemLabelDetails] a new instance of CompletionItemLabelDetails - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#8 - def initialize(detail: T.unsafe(nil), description: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#37 - def attributes; end - - # An optional string which is rendered less prominently after - # {@link CompletionItemLabelDetails.detail}. Should be used for fully qualified - # names or file path. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#33 - def description; end - - # An optional string which is rendered less prominently directly after - # {@link CompletionItem.label label}, without any spacing. Should be - # used for function signatures or type annotations. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#23 - def detail; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#43 - def to_json(*args); end -end - -# Represents a collection of [completion items](#CompletionItem) to be -# presented in the editor. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#8 -class LanguageServer::Protocol::Interface::CompletionList - # @return [CompletionList] a new instance of CompletionList - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#9 - def initialize(is_incomplete:, items:, item_defaults: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#57 - def attributes; end - - # This list is not complete. Further typing should result in recomputing - # this list. - # - # Recomputed lists have all their items replaced (not appended) in the - # incomplete completion sessions. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#27 - def is_incomplete; end - - # In many cases the items of an actual completion result share the same - # value for properties like `commitCharacters` or the range of a text - # edit. A completion list can therefore define item defaults which will - # be used if a completion item itself doesn't specify the value. - # - # If a completion list specifies a default value and a completion item - # also specifies a corresponding value the one from the item is used. - # - # Servers are only allowed to return default values if the client - # signals support for this via the `completionList.itemDefaults` - # capability. - # - # @return [{ commitCharacters?: string[]; editRange?: Range | { insert: Range; replace: Range; }; insertTextFormat?: InsertTextFormat; insertTextMode?: InsertTextMode; data?: LSPAny; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#45 - def item_defaults; end - - # The completion items. - # - # @return [CompletionItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#53 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#63 - def to_json(*args); end -end - -# Completion options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#7 -class LanguageServer::Protocol::Interface::CompletionOptions - # @return [CompletionOptions] a new instance of CompletionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end - - # The list of all possible characters that commit a completion. This field - # can be used if clients don't support individual commit characters per - # completion item. See client capability - # `completion.completionItem.commitCharactersSupport`. - # - # If a server provides both `allCommitCharacters` and commit characters on - # an individual completion item the ones on the completion item win. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#53 - def all_commit_characters; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#75 - def attributes; end - - # The server supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#71 - def completion_item; end - - # The server provides support to resolve additional - # information for a completion item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#62 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#77 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#81 - def to_json(*args); end - - # The additional characters, beyond the defaults provided by the client (typically - # [a-zA-Z]), that should automatically trigger a completion request. For example - # `.` in JavaScript represents the beginning of an object property or method and is - # thus a good candidate for triggering a completion request. - # - # Most tools trigger a completion request automatically without explicitly - # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they - # do so when the user starts to type an identifier. For example if the user - # types `c` in a JavaScript file code complete will automatically pop up - # present `console` besides others as a completion item. Characters that - # make up identifiers don't need to be listed here. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#39 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#21 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#4 -class LanguageServer::Protocol::Interface::CompletionParams - # @return [CompletionParams] a new instance of CompletionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), context: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#60 - def attributes; end - - # The completion context. This is only available if the client specifies - # to send this using the client capability - # `completion.contextSupport === true` - # - # @return [CompletionContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#56 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#46 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#29 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#66 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#37 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CompletionRegistrationOptions - # @return [CompletionRegistrationOptions] a new instance of CompletionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end - - # The list of all possible characters that commit a completion. This field - # can be used if clients don't support individual commit characters per - # completion item. See client capability - # `completion.completionItem.commitCharactersSupport`. - # - # If a server provides both `allCommitCharacters` and commit characters on - # an individual completion item the ones on the completion item win. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#60 - def all_commit_characters; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#82 - def attributes; end - - # The server supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#78 - def completion_item; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#23 - def document_selector; end - - # The server provides support to resolve additional - # information for a completion item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#69 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#84 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#88 - def to_json(*args); end - - # The additional characters, beyond the defaults provided by the client (typically - # [a-zA-Z]), that should automatically trigger a completion request. For example - # `.` in JavaScript represents the beginning of an object property or method and is - # thus a good candidate for triggering a completion request. - # - # Most tools trigger a completion request automatically without explicitly - # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they - # do so when the user starts to type an identifier. For example if the user - # types `c` in a JavaScript file code complete will automatically pop up - # present `console` besides others as a completion item. Characters that - # make up identifiers don't need to be listed here. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#46 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#28 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#4 -class LanguageServer::Protocol::Interface::ConfigurationItem - # @return [ConfigurationItem] a new instance of ConfigurationItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#5 - def initialize(scope_uri: T.unsafe(nil), section: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#30 - def attributes; end - - # The scope to get the configuration section for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#18 - def scope_uri; end - - # The configuration section asked for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#26 - def section; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#4 -class LanguageServer::Protocol::Interface::ConfigurationParams - # @return [ConfigurationParams] a new instance of ConfigurationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#5 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#18 - def attributes; end - - # @return [ConfigurationItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#14 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#24 - def to_json(*args); end -end - -# Create file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#7 -class LanguageServer::Protocol::Interface::CreateFile - # @return [CreateFile] a new instance of CreateFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#8 - def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#47 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#51 - def attributes; end - - # A create - # - # @return ["create"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#23 - def kind; end - - # Additional options - # - # @return [CreateFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#39 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#57 - def to_json(*args); end - - # The resource to create. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#31 - def uri; end -end - -# Options to create a file. -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#7 -class LanguageServer::Protocol::Interface::CreateFileOptions - # @return [CreateFileOptions] a new instance of CreateFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#8 - def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#33 - def attributes; end - - # Ignore if exists. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#29 - def ignore_if_exists; end - - # Overwrite existing file. Overwrite wins over `ignoreIfExists` - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#21 - def overwrite; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated creation -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#8 -class LanguageServer::Protocol::Interface::CreateFilesParams - # @return [CreateFilesParams] a new instance of CreateFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#25 - def attributes; end - - # An array of all files/folders created in this operation. - # - # @return [FileCreate[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#21 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DeclarationClientCapabilities - # @return [DeclarationClientCapabilities] a new instance of DeclarationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#32 - def attributes; end - - # Whether declaration supports dynamic registration. If this is set to - # `true` the client supports the new `DeclarationRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of declaration links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#4 -class LanguageServer::Protocol::Interface::DeclarationOptions - # @return [DeclarationOptions] a new instance of DeclarationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#4 -class LanguageServer::Protocol::Interface::DeclarationParams - # @return [DeclarationParams] a new instance of DeclarationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DeclarationRegistrationOptions - # @return [DeclarationRegistrationOptions] a new instance of DeclarationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#25 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DefinitionClientCapabilities - # @return [DefinitionClientCapabilities] a new instance of DefinitionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#30 - def attributes; end - - # Whether definition supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#18 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#26 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#4 -class LanguageServer::Protocol::Interface::DefinitionOptions - # @return [DefinitionOptions] a new instance of DefinitionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#4 -class LanguageServer::Protocol::Interface::DefinitionParams - # @return [DefinitionParams] a new instance of DefinitionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DefinitionRegistrationOptions - # @return [DefinitionRegistrationOptions] a new instance of DefinitionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#24 - def work_done_progress; end -end - -# Delete file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#7 -class LanguageServer::Protocol::Interface::DeleteFile - # @return [DeleteFile] a new instance of DeleteFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#8 - def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#47 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#51 - def attributes; end - - # A delete - # - # @return ["delete"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#23 - def kind; end - - # Delete options. - # - # @return [DeleteFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#39 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#57 - def to_json(*args); end - - # The file to delete. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#31 - def uri; end -end - -# Delete file options -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#7 -class LanguageServer::Protocol::Interface::DeleteFileOptions - # @return [DeleteFileOptions] a new instance of DeleteFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#8 - def initialize(recursive: T.unsafe(nil), ignore_if_not_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#33 - def attributes; end - - # Ignore the operation if the file doesn't exist. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#29 - def ignore_if_not_exists; end - - # Delete the content recursively if a folder is denoted. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#21 - def recursive; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated deletes -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#8 -class LanguageServer::Protocol::Interface::DeleteFilesParams - # @return [DeleteFilesParams] a new instance of DeleteFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#25 - def attributes; end - - # An array of all files/folders deleted in this operation. - # - # @return [FileDelete[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#21 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#4 -class LanguageServer::Protocol::Interface::Diagnostic - # @return [Diagnostic] a new instance of Diagnostic - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#5 - def initialize(range:, message:, severity: T.unsafe(nil), code: T.unsafe(nil), code_description: T.unsafe(nil), source: T.unsafe(nil), tags: T.unsafe(nil), related_information: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#98 - def attributes; end - - # The diagnostic's code, which might appear in the user interface. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#42 - def code; end - - # An optional property to describe the error code. - # - # @return [CodeDescription] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#50 - def code_description; end - - # A data entry field that is preserved between a - # `textDocument/publishDiagnostics` notification and - # `textDocument/codeAction` request. - # - # @return [unknown] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#94 - def data; end - - # The diagnostic's message. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#67 - def message; end - - # The range at which the message applies. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#25 - def range; end - - # An array of related diagnostic information, e.g. when symbol-names within - # a scope collide all definitions can be marked via this property. - # - # @return [DiagnosticRelatedInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#84 - def related_information; end - - # The diagnostic's severity. Can be omitted. If omitted it is up to the - # client to interpret diagnostics as error, warning, info or hint. - # - # @return [DiagnosticSeverity] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#34 - def severity; end - - # A human-readable string describing the source of this - # diagnostic, e.g. 'typescript' or 'super lint'. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#59 - def source; end - - # Additional metadata about the diagnostic. - # - # @return [DiagnosticTag[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#75 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#100 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#104 - def to_json(*args); end -end - -# Client capabilities specific to diagnostic pull requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticClientCapabilities - # @return [DiagnosticClientCapabilities] a new instance of DiagnosticClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), related_document_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#37 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#24 - def dynamic_registration; end - - # Whether the clients supports related documents for document diagnostic - # pulls. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#33 - def related_document_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#43 - def to_json(*args); end -end - -# Diagnostic options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticOptions - # @return [DiagnosticOptions] a new instance of DiagnosticOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#8 - def initialize(inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#52 - def attributes; end - - # An optional identifier under which the diagnostics are - # managed by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#29 - def identifier; end - - # Whether the language has inter file dependencies meaning that - # editing code in one file can result in a different diagnostic - # set in another file. Inter file dependencies are common for - # most programming languages and typically uncommon for linters. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#40 - def inter_file_dependencies; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#58 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#20 - def work_done_progress; end - - # The server provides support for workspace diagnostics as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#48 - def workspace_diagnostics; end -end - -# Diagnostic registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticRegistrationOptions - # @return [DiagnosticRegistrationOptions] a new instance of DiagnosticRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#8 - def initialize(document_selector:, inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#72 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#26 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#68 - def id; end - - # An optional identifier under which the diagnostics are - # managed by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#40 - def identifier; end - - # Whether the language has inter file dependencies meaning that - # editing code in one file can result in a different diagnostic - # set in another file. Inter file dependencies are common for - # most programming languages and typically uncommon for linters. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#51 - def inter_file_dependencies; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#74 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#78 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#31 - def work_done_progress; end - - # The server provides support for workspace diagnostics as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#59 - def workspace_diagnostics; end -end - -# Represents a related message and source code location for a diagnostic. -# This should be used to point to code locations that cause or are related to -# a diagnostics, e.g when duplicating a symbol in a scope. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#9 -class LanguageServer::Protocol::Interface::DiagnosticRelatedInformation - # @return [DiagnosticRelatedInformation] a new instance of DiagnosticRelatedInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#10 - def initialize(location:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#35 - def attributes; end - - # The location of this related diagnostic information. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#23 - def location; end - - # The message of this related diagnostic information. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#31 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#41 - def to_json(*args); end -end - -# Cancellation data returned from a diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticServerCancellationData - # @return [DiagnosticServerCancellationData] a new instance of DiagnosticServerCancellationData - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#8 - def initialize(retrigger_request:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#21 - def attributes; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#17 - def retrigger_request; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#27 - def to_json(*args); end -end - -# Workspace client capabilities specific to diagnostic pull requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticWorkspaceClientCapabilities - # @return [DiagnosticWorkspaceClientCapabilities] a new instance of DiagnosticWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # pulled diagnostics currently shown. It should be used with absolute care - # and is useful for situation where a server for example detects a project - # wide change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DidChangeConfigurationClientCapabilities - # @return [DidChangeConfigurationClientCapabilities] a new instance of DidChangeConfigurationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#21 - def attributes; end - - # Did change configuration notification supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeConfigurationParams - # @return [DidChangeConfigurationParams] a new instance of DidChangeConfigurationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#5 - def initialize(settings:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#21 - def attributes; end - - # The actual changed settings - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#17 - def settings; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#27 - def to_json(*args); end -end - -# The params sent in a change notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidChangeNotebookDocumentParams - # @return [DidChangeNotebookDocumentParams] a new instance of DidChangeNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#8 - def initialize(notebook_document:, change:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#44 - def attributes; end - - # The actual changes to the notebook document. - # - # The change describes single state change to the notebook document. - # So it moves a notebook document, its cells and its cell text document - # contents from state S to S'. - # - # To mirror the content of a notebook using change events use the - # following approach: - # - start with the same initial content - # - apply the 'notebookDocument/didChange' notifications in the order - # you receive them. - # - # @return [NotebookDocumentChangeEvent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#40 - def change; end - - # The notebook document that did change. The version number points - # to the version after all provided changes have been applied. - # - # @return [VersionedNotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#22 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeTextDocumentParams - # @return [DidChangeTextDocumentParams] a new instance of DidChangeTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#5 - def initialize(text_document:, content_changes:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#44 - def attributes; end - - # The actual content changes. The content changes describe single state - # changes to the document. So if there are two content changes c1 (at - # array index 0) and c2 (at array index 1) for a document in state S then - # c1 moves the document from S to S' and c2 from S' to S''. So c1 is - # computed on the state S and c2 is computed on the state S'. - # - # To mirror the content of a document using change events use the following - # approach: - # - start with the same initial content - # - apply the 'textDocument/didChange' notifications in the order you - # receive them. - # - apply the `TextDocumentContentChangeEvent`s in a single notification - # in the order you receive them. - # - # @return [TextDocumentContentChangeEvent[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#40 - def content_changes; end - - # The document that did change. The version number points - # to the version after all provided content changes have - # been applied. - # - # @return [VersionedTextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesClientCapabilities - # @return [DidChangeWatchedFilesClientCapabilities] a new instance of DidChangeWatchedFilesClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), relative_pattern_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#33 - def attributes; end - - # Did change watched files notification supports dynamic registration. - # Please note that the current protocol doesn't support static - # configuration for file changes from the server side. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#20 - def dynamic_registration; end - - # Whether the client has support for relative patterns - # or not. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#29 - def relative_pattern_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesParams - # @return [DidChangeWatchedFilesParams] a new instance of DidChangeWatchedFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#5 - def initialize(changes:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#21 - def attributes; end - - # The actual file events. - # - # @return [FileEvent[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#17 - def changes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#27 - def to_json(*args); end -end - -# Describe options to be used when registering for file system change events. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#7 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesRegistrationOptions - # @return [DidChangeWatchedFilesRegistrationOptions] a new instance of DidChangeWatchedFilesRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#8 - def initialize(watchers:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#30 - def to_json(*args); end - - # The watchers to register. - # - # @return [FileSystemWatcher[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#20 - def watchers; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWorkspaceFoldersParams - # @return [DidChangeWorkspaceFoldersParams] a new instance of DidChangeWorkspaceFoldersParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#5 - def initialize(event:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#21 - def attributes; end - - # The actual workspace folder change event. - # - # @return [WorkspaceFoldersChangeEvent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#17 - def event; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#27 - def to_json(*args); end -end - -# The params sent in a close notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidCloseNotebookDocumentParams - # @return [DidCloseNotebookDocumentParams] a new instance of DidCloseNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#8 - def initialize(notebook_document:, cell_text_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#34 - def attributes; end - - # The text documents that represent the content - # of a notebook cell that got closed. - # - # @return [TextDocumentIdentifier[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#30 - def cell_text_documents; end - - # The notebook document that got closed. - # - # @return [NotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#21 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidCloseTextDocumentParams - # @return [DidCloseTextDocumentParams] a new instance of DidCloseTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#5 - def initialize(text_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#21 - def attributes; end - - # The document that was closed. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#17 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#27 - def to_json(*args); end -end - -# The params sent in an open notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidOpenNotebookDocumentParams - # @return [DidOpenNotebookDocumentParams] a new instance of DidOpenNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#8 - def initialize(notebook_document:, cell_text_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#34 - def attributes; end - - # The text documents that represent the content - # of a notebook cell. - # - # @return [TextDocumentItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#30 - def cell_text_documents; end - - # The notebook document that got opened. - # - # @return [NotebookDocument] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#21 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidOpenTextDocumentParams - # @return [DidOpenTextDocumentParams] a new instance of DidOpenTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#5 - def initialize(text_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#21 - def attributes; end - - # The document that was opened. - # - # @return [TextDocumentItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#17 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#27 - def to_json(*args); end -end - -# The params sent in a save notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidSaveNotebookDocumentParams - # @return [DidSaveNotebookDocumentParams] a new instance of DidSaveNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#8 - def initialize(notebook_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#24 - def attributes; end - - # The notebook document that got saved. - # - # @return [NotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#20 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidSaveTextDocumentParams - # @return [DidSaveTextDocumentParams] a new instance of DidSaveTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#5 - def initialize(text_document:, text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#31 - def attributes; end - - # Optional the content when saved. Depends on the includeText value - # when the save notification was requested. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#27 - def text; end - - # The document that was saved. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorClientCapabilities - # @return [DocumentColorClientCapabilities] a new instance of DocumentColorClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#21 - def attributes; end - - # Whether document color supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorOptions - # @return [DocumentColorOptions] a new instance of DocumentColorOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorParams - # @return [DocumentColorParams] a new instance of DocumentColorParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions - # @return [DocumentColorRegistrationOptions] a new instance of DocumentColorRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#5 - def initialize(document_selector:, id: T.unsafe(nil), work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#29 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#34 - def work_done_progress; end -end - -# Parameters of the document diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#7 -class LanguageServer::Protocol::Interface::DocumentDiagnosticParams - # @return [DocumentDiagnosticParams] a new instance of DocumentDiagnosticParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#8 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil), previous_result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#61 - def attributes; end - - # The additional identifier provided during registration. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#49 - def identifier; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#33 - def partial_result_token; end - - # The result id of a previous response if provided. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#57 - def previous_result_id; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#41 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#67 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#24 - def work_done_token; end -end - -# A partial result for a document diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#7 -class LanguageServer::Protocol::Interface::DocumentDiagnosticReportPartialResult - # @return [DocumentDiagnosticReportPartialResult] a new instance of DocumentDiagnosticReportPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#8 - def initialize(related_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#21 - def attributes; end - - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#17 - def related_documents; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#4 -class LanguageServer::Protocol::Interface::DocumentFilter - # @return [DocumentFilter] a new instance of DocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#5 - def initialize(language: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#51 - def attributes; end - - # A language id, like `typescript`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#19 - def language; end - - # A glob pattern, like `*.{ts,js}`. - # - # Glob patterns can have the following syntax: - # - `*` to match one or more characters in a path segment - # - `?` to match on one character in a path segment - # - `**` to match any number of path segments, including none - # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` - # matches all TypeScript and JavaScript files) - # - `[]` to declare a range of characters to match in a path segment - # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - # - `[!...]` to negate a range of characters to match in a path segment - # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but - # not `example.0`) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#47 - def pattern; end - - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#27 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#57 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingClientCapabilities - # @return [DocumentFormattingClientCapabilities] a new instance of DocumentFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingOptions - # @return [DocumentFormattingOptions] a new instance of DocumentFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingParams - # @return [DocumentFormattingParams] a new instance of DocumentFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#5 - def initialize(text_document:, options:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#39 - def attributes; end - - # The format options. - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#35 - def options; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#27 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingRegistrationOptions - # @return [DocumentFormattingRegistrationOptions] a new instance of DocumentFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#24 - def work_done_progress; end -end - -# A document highlight is a range inside a text document which deserves -# special attention. Usually a document highlight is visualized by changing -# the background color of its range. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#9 -class LanguageServer::Protocol::Interface::DocumentHighlight - # @return [DocumentHighlight] a new instance of DocumentHighlight - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#10 - def initialize(range:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#35 - def attributes; end - - # The highlight kind, default is DocumentHighlightKind.Text. - # - # @return [DocumentHighlightKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#31 - def kind; end - - # The range this highlight applies to. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#23 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#41 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightClientCapabilities - # @return [DocumentHighlightClientCapabilities] a new instance of DocumentHighlightClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#21 - def attributes; end - - # Whether document highlight supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightOptions - # @return [DocumentHighlightOptions] a new instance of DocumentHighlightOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightParams - # @return [DocumentHighlightParams] a new instance of DocumentHighlightParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightRegistrationOptions - # @return [DocumentHighlightRegistrationOptions] a new instance of DocumentHighlightRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#24 - def work_done_progress; end -end - -# A document link is a range in a text document that links to an internal or -# external resource, like another text document or a web site. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#8 -class LanguageServer::Protocol::Interface::DocumentLink - # @return [DocumentLink] a new instance of DocumentLink - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#9 - def initialize(range:, target: T.unsafe(nil), tooltip: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#58 - def attributes; end - - # A data entry field that is preserved on a document link between a - # DocumentLinkRequest and a DocumentLinkResolveRequest. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#54 - def data; end - - # The range this link applies to. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#24 - def range; end - - # The uri this link points to. If missing a resolve request is sent later. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#32 - def target; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#64 - def to_json(*args); end - - # The tooltip text when you hover over this link. - # - # If a tooltip is provided, is will be displayed in a string that includes - # instructions on how to trigger the link, such as `{0} (ctrl + click)`. - # The specific instructions vary depending on OS, user settings, and - # localization. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#45 - def tooltip; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkClientCapabilities - # @return [DocumentLinkClientCapabilities] a new instance of DocumentLinkClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), tooltip_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#30 - def attributes; end - - # Whether document link supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#18 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#36 - def to_json(*args); end - - # Whether the client supports the `tooltip` property on `DocumentLink`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#26 - def tooltip_support; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkOptions - # @return [DocumentLinkOptions] a new instance of DocumentLinkOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#27 - def attributes; end - - # Document links have a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#23 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkParams - # @return [DocumentLinkParams] a new instance of DocumentLinkParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#28 - def partial_result_token; end - - # The document to provide document links for. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions - # @return [DocumentLinkRegistrationOptions] a new instance of DocumentLinkRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#20 - def document_selector; end - - # Document links have a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#33 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingClientCapabilities - # @return [DocumentOnTypeFormattingClientCapabilities] a new instance of DocumentOnTypeFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether on type formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions - # @return [DocumentOnTypeFormattingOptions] a new instance of DocumentOnTypeFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#5 - def initialize(first_trigger_character:, more_trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#30 - def attributes; end - - # A character on which formatting should be triggered, like `{`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#18 - def first_trigger_character; end - - # More trigger characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#26 - def more_trigger_character; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingParams - # @return [DocumentOnTypeFormattingParams] a new instance of DocumentOnTypeFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#5 - def initialize(text_document:, position:, ch:, options:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#53 - def attributes; end - - # The character that has been typed that triggered the formatting - # on type request. That is not necessarily the last character that - # got inserted into the document since the client could auto insert - # characters as well (e.g. like automatic brace completion). - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#41 - def ch; end - - # The formatting options. - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#49 - def options; end - - # The position around which the on type formatting should happen. - # This is not necessarily the exact position where the character denoted - # by the property `ch` got typed. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#30 - def position; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#55 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#59 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingRegistrationOptions - # @return [DocumentOnTypeFormattingRegistrationOptions] a new instance of DocumentOnTypeFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#5 - def initialize(document_selector:, first_trigger_character:, more_trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#40 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#20 - def document_selector; end - - # A character on which formatting should be triggered, like `{`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#28 - def first_trigger_character; end - - # More trigger characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#36 - def more_trigger_character; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingClientCapabilities - # @return [DocumentRangeFormattingClientCapabilities] a new instance of DocumentRangeFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingOptions - # @return [DocumentRangeFormattingOptions] a new instance of DocumentRangeFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingParams - # @return [DocumentRangeFormattingParams] a new instance of DocumentRangeFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#5 - def initialize(text_document:, range:, options:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#48 - def attributes; end - - # The format options - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#44 - def options; end - - # The range to format - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#36 - def range; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#28 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#50 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#54 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingRegistrationOptions - # @return [DocumentRangeFormattingRegistrationOptions] a new instance of DocumentRangeFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#24 - def work_done_progress; end -end - -# Represents programming constructs like variables, classes, interfaces etc. -# that appear in a document. Document symbols can be hierarchical and they -# have two ranges: one that encloses its definition and one that points to its -# most interesting range, e.g. the range of an identifier. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#10 -class LanguageServer::Protocol::Interface::DocumentSymbol - # @return [DocumentSymbol] a new instance of DocumentSymbol - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#11 - def initialize(name:, kind:, range:, selection_range:, detail: T.unsafe(nil), tags: T.unsafe(nil), deprecated: T.unsafe(nil), children: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#96 - def attributes; end - - # Children of this symbol, e.g. properties of a class. - # - # @return [DocumentSymbol[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#92 - def children; end - - # Indicates if this symbol is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#64 - def deprecated; end - - # More detail for this symbol, e.g the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#40 - def detail; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#48 - def kind; end - - # The name of this symbol. Will be displayed in the user interface and - # therefore must not be an empty string or a string only consisting of - # white spaces. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#32 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else like comments. This information is typically used to - # determine if the clients cursor is inside the symbol to reveal in the - # symbol in the UI. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#75 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the `range`. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#84 - def selection_range; end - - # Tags for this document symbol. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#56 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#98 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#102 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities - # @return [DocumentSymbolClientCapabilities] a new instance of DocumentSymbolClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), hierarchical_document_symbol_support: T.unsafe(nil), tag_support: T.unsafe(nil), label_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#61 - def attributes; end - - # Whether document symbol supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#21 - def dynamic_registration; end - - # The client supports hierarchical document symbols. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#38 - def hierarchical_document_symbol_support; end - - # The client supports an additional label presented in the UI when - # registering a document symbol provider. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#57 - def label_support; end - - # Specific capabilities for the `SymbolKind` in the - # `textDocument/documentSymbol` request. - # - # @return [{ valueSet?: SymbolKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#30 - def symbol_kind; end - - # The client supports tags on `SymbolInformation`. Tags are supported on - # `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: 1[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#48 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#67 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolOptions - # @return [DocumentSymbolOptions] a new instance of DocumentSymbolOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#28 - def attributes; end - - # A human-readable string that is shown when multiple outlines trees - # are shown for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#24 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolParams - # @return [DocumentSymbolParams] a new instance of DocumentSymbolParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolRegistrationOptions - # @return [DocumentSymbolRegistrationOptions] a new instance of DocumentSymbolRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#20 - def document_selector; end - - # A human-readable string that is shown when multiple outlines trees - # are shown for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#34 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandClientCapabilities - # @return [ExecuteCommandClientCapabilities] a new instance of ExecuteCommandClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#21 - def attributes; end - - # Execute command supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandOptions - # @return [ExecuteCommandOptions] a new instance of ExecuteCommandOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#5 - def initialize(commands:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#27 - def attributes; end - - # The commands to be executed on the server - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#23 - def commands; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandParams - # @return [ExecuteCommandParams] a new instance of ExecuteCommandParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#5 - def initialize(command:, work_done_token: T.unsafe(nil), arguments: T.unsafe(nil)); end - - # Arguments that the command should be invoked with. - # - # @return [LSPAny[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#35 - def arguments; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#39 - def attributes; end - - # The identifier of the actual command handler. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#27 - def command; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#19 - def work_done_token; end -end - -# Execute command registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#7 -class LanguageServer::Protocol::Interface::ExecuteCommandRegistrationOptions - # @return [ExecuteCommandRegistrationOptions] a new instance of ExecuteCommandRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#8 - def initialize(commands:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#30 - def attributes; end - - # The commands to be executed on the server - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#26 - def commands; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#36 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#18 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#4 -class LanguageServer::Protocol::Interface::ExecutionSummary - # @return [ExecutionSummary] a new instance of ExecutionSummary - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#5 - def initialize(execution_order:, success: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#33 - def attributes; end - - # A strict monotonically increasing value - # indicating the execution order of a cell - # inside a notebook. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#20 - def execution_order; end - - # Whether the execution was successful or - # not if known by the client. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#29 - def success; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#39 - def to_json(*args); end -end - -# Represents information on a file/folder create. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#7 -class LanguageServer::Protocol::Interface::FileCreate - # @return [FileCreate] a new instance of FileCreate - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#30 - def to_json(*args); end - - # A file:// URI for the location of the file/folder being created. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#20 - def uri; end -end - -# Represents information on a file/folder delete. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#7 -class LanguageServer::Protocol::Interface::FileDelete - # @return [FileDelete] a new instance of FileDelete - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#30 - def to_json(*args); end - - # A file:// URI for the location of the file/folder being deleted. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#20 - def uri; end -end - -# An event describing a file change. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#7 -class LanguageServer::Protocol::Interface::FileEvent - # @return [FileEvent] a new instance of FileEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#8 - def initialize(uri:, type:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#39 - def to_json(*args); end - - # The change type. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#29 - def type; end - - # The file's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#21 - def uri; end -end - -# A filter to describe in which file operation requests or notifications -# the server is interested in. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#8 -class LanguageServer::Protocol::Interface::FileOperationFilter - # @return [FileOperationFilter] a new instance of FileOperationFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#9 - def initialize(pattern:, scheme: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#34 - def attributes; end - - # The actual file operation pattern. - # - # @return [FileOperationPattern] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#30 - def pattern; end - - # A Uri like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#22 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#40 - def to_json(*args); end -end - -# A pattern to describe in which file operation requests or notifications -# the server is interested in. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#8 -class LanguageServer::Protocol::Interface::FileOperationPattern - # @return [FileOperationPattern] a new instance of FileOperationPattern - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#9 - def initialize(glob:, matches: T.unsafe(nil), options: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#55 - def attributes; end - - # The glob pattern to match. Glob patterns can have the following syntax: - # - `*` to match one or more characters in a path segment - # - `?` to match on one character in a path segment - # - `**` to match any number of path segments, including none - # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` - # matches all TypeScript and JavaScript files) - # - `[]` to declare a range of characters to match in a path segment - # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - # - `[!...]` to negate a range of characters to match in a path segment - # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but - # not `example.0`) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#33 - def glob; end - - # Whether to match files or folders with this pattern. - # - # Matches both if undefined. - # - # @return [FileOperationPatternKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#43 - def matches; end - - # Additional options used during matching. - # - # @return [FileOperationPatternOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#51 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#57 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#61 - def to_json(*args); end -end - -# Matching options for the file operation pattern. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#7 -class LanguageServer::Protocol::Interface::FileOperationPatternOptions - # @return [FileOperationPatternOptions] a new instance of FileOperationPatternOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#8 - def initialize(ignore_case: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#24 - def attributes; end - - # The pattern should be matched ignoring casing. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#20 - def ignore_case; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#30 - def to_json(*args); end -end - -# The options to register for file operations. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#7 -class LanguageServer::Protocol::Interface::FileOperationRegistrationOptions - # @return [FileOperationRegistrationOptions] a new instance of FileOperationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#8 - def initialize(filters:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#24 - def attributes; end - - # The actual filters. - # - # @return [FileOperationFilter[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#20 - def filters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#30 - def to_json(*args); end -end - -# Represents information on a file/folder rename. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#7 -class LanguageServer::Protocol::Interface::FileRename - # @return [FileRename] a new instance of FileRename - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#8 - def initialize(old_uri:, new_uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#33 - def attributes; end - - # A file:// URI for the new location of the file/folder being renamed. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#29 - def new_uri; end - - # A file:// URI for the original location of the file/folder being renamed. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#21 - def old_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#4 -class LanguageServer::Protocol::Interface::FileSystemWatcher - # @return [FileSystemWatcher] a new instance of FileSystemWatcher - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#5 - def initialize(glob_pattern:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#33 - def attributes; end - - # The glob pattern to watch. See {@link GlobPattern glob pattern} - # for more detail. - # - # @return [GlobPattern] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#19 - def glob_pattern; end - - # The kind of events of interest. If omitted it defaults - # to WatchKind.Create | WatchKind.Change | WatchKind.Delete - # which is 7. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#29 - def kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#39 - def to_json(*args); end -end - -# Represents a folding range. To be valid, start and end line must be bigger -# than zero and smaller than the number of lines in the document. Clients -# are free to ignore invalid ranges. -# -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#9 -class LanguageServer::Protocol::Interface::FoldingRange - # @return [FoldingRange] a new instance of FoldingRange - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#10 - def initialize(start_line:, end_line:, start_character: T.unsafe(nil), end_character: T.unsafe(nil), kind: T.unsafe(nil), collapsed_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#82 - def attributes; end - - # The text that the client should show when the specified range is - # collapsed. If not defined or not supported by the client, a default - # will be chosen by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#78 - def collapsed_text; end - - # The zero-based character offset before the folded range ends. If not - # defined, defaults to the length of the end line. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#57 - def end_character; end - - # The zero-based end line of the range to fold. The folded area ends with - # the line's last character. To be valid, the end must be zero or larger - # and smaller than the number of lines in the document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#48 - def end_line; end - - # Describes the kind of the folding range such as `comment` or `region`. - # The kind is used to categorize folding ranges and used by commands like - # 'Fold all comments'. See [FoldingRangeKind](#FoldingRangeKind) for an - # enumeration of standardized kinds. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#68 - def kind; end - - # The zero-based character offset from where the folded range starts. If - # not defined, defaults to the length of the start line. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#38 - def start_character; end - - # The zero-based start line of the range to fold. The folded area starts - # after the line's last character. To be valid, the end must be zero or - # larger and smaller than the number of lines in the document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#29 - def start_line; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#84 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#88 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities - # @return [FoldingRangeClientCapabilities] a new instance of FoldingRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), range_limit: T.unsafe(nil), line_folding_only: T.unsafe(nil), folding_range_kind: T.unsafe(nil), folding_range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#64 - def attributes; end - - # Whether implementation supports dynamic registration for folding range - # providers. If this is set to `true` the client supports the new - # `FoldingRangeRegistrationOptions` return value for the corresponding - # server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#24 - def dynamic_registration; end - - # Specific options for the folding range. - # - # @return [{ collapsedText?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#60 - def folding_range; end - - # Specific options for the folding range kind. - # - # @return [{ valueSet?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#52 - def folding_range_kind; end - - # If set, the client signals that it only supports folding complete lines. - # If set, client will ignore specified `startCharacter` and `endCharacter` - # properties in a FoldingRange. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#44 - def line_folding_only; end - - # The maximum number of folding ranges that the client prefers to receive - # per document. The value serves as a hint, servers are free to follow the - # limit. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#34 - def range_limit; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#66 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#70 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeOptions - # @return [FoldingRangeOptions] a new instance of FoldingRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeParams - # @return [FoldingRangeParams] a new instance of FoldingRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeRegistrationOptions - # @return [FoldingRangeRegistrationOptions] a new instance of FoldingRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#25 - def work_done_progress; end -end - -# Value-object describing what options formatting should use. -# -# source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#7 -class LanguageServer::Protocol::Interface::FormattingOptions - # @return [FormattingOptions] a new instance of FormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#8 - def initialize(tab_size:, insert_spaces:, trim_trailing_whitespace: T.unsafe(nil), insert_final_newline: T.unsafe(nil), trim_final_newlines: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#60 - def attributes; end - - # Insert a newline character at the end of the file if one does not exist. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#48 - def insert_final_newline; end - - # Prefer spaces over tabs. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#32 - def insert_spaces; end - - # Size of a tab in spaces. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#24 - def tab_size; end - - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#66 - def to_json(*args); end - - # Trim all newlines after the final newline at the end of the file. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#56 - def trim_final_newlines; end - - # Trim trailing whitespace on a line. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#40 - def trim_trailing_whitespace; end -end - -# A diagnostic report with a full set of problems. -# -# source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport - # @return [FullDocumentDiagnosticReport] a new instance of FullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#44 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#40 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#22 - def kind; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#32 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#50 - def to_json(*args); end -end - -# The result of a hover request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#7 -class LanguageServer::Protocol::Interface::Hover - # @return [Hover] a new instance of Hover - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#8 - def initialize(contents:, range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#34 - def attributes; end - - # The hover's content - # - # @return [MarkupContent | MarkedString | MarkedString[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#21 - def contents; end - - # An optional range is a range inside a text document - # that is used to visualize a hover, e.g. by changing the background color. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#30 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::HoverClientCapabilities - # @return [HoverClientCapabilities] a new instance of HoverClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), content_format: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#32 - def attributes; end - - # Client supports the follow content formats if the content - # property refers to a `literal of type MarkupContent`. - # The order describes the preferred format of the client. - # - # @return [MarkupKind[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#28 - def content_format; end - - # Whether hover supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#18 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#4 -class LanguageServer::Protocol::Interface::HoverOptions - # @return [HoverOptions] a new instance of HoverOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#4 -class LanguageServer::Protocol::Interface::HoverParams - # @return [HoverParams] a new instance of HoverParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#4 -class LanguageServer::Protocol::Interface::HoverRegistrationOptions - # @return [HoverRegistrationOptions] a new instance of HoverRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#24 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#4 -class LanguageServer::Protocol::Interface::HoverResult - # @return [HoverResult] a new instance of HoverResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#5 - def initialize(value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#24 - def to_json(*args); end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#14 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ImplementationClientCapabilities - # @return [ImplementationClientCapabilities] a new instance of ImplementationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#32 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `ImplementationRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#4 -class LanguageServer::Protocol::Interface::ImplementationOptions - # @return [ImplementationOptions] a new instance of ImplementationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#4 -class LanguageServer::Protocol::Interface::ImplementationParams - # @return [ImplementationParams] a new instance of ImplementationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#4 -class LanguageServer::Protocol::Interface::ImplementationRegistrationOptions - # @return [ImplementationRegistrationOptions] a new instance of ImplementationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#4 -class LanguageServer::Protocol::Interface::InitializeError - # @return [InitializeError] a new instance of InitializeError - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#5 - def initialize(retry:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#24 - def attributes; end - - # Indicates whether the client execute the following retry logic: - # (1) show the message provided by the ResponseError to the user - # (2) user selects retry or cancel - # (3) if user selected retry the initialize method is sent again. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#20 - def retry; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#4 -class LanguageServer::Protocol::Interface::InitializeParams - # @return [InitializeParams] a new instance of InitializeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#5 - def initialize(process_id:, root_uri:, capabilities:, work_done_token: T.unsafe(nil), client_info: T.unsafe(nil), locale: T.unsafe(nil), root_path: T.unsafe(nil), initialization_options: T.unsafe(nil), trace: T.unsafe(nil), workspace_folders: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#116 - def attributes; end - - # The capabilities provided by the client (editor or tool) - # - # @return [ClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#93 - def capabilities; end - - # Information about the client - # - # @return [{ name: string; version?: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#45 - def client_info; end - - # User provided initialization options. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#85 - def initialization_options; end - - # The locale the client is currently showing the user interface - # in. This must not necessarily be the locale of the operating - # system. - # - # Uses IETF language tags as the value's syntax - # (See https://en.wikipedia.org/wiki/IETF_language_tag) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#58 - def locale; end - - # The process Id of the parent process that started the server. Is null if - # the process has not been started by another process. If the parent - # process is not alive then the server should exit (see exit notification) - # its process. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#37 - def process_id; end - - # The rootPath of the workspace. Is null - # if no folder is open. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#67 - def root_path; end - - # The rootUri of the workspace. Is null if no - # folder is open. If both `rootPath` and `rootUri` are set - # `rootUri` wins. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#77 - def root_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#118 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#122 - def to_json(*args); end - - # The initial trace setting. If omitted trace is disabled ('off'). - # - # @return [TraceValue] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#101 - def trace; end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#26 - def work_done_token; end - - # The workspace folders configured in the client when the server starts. - # This property is only available if the client supports workspace folders. - # It can be `null` if the client supports workspace folders but none are - # configured. - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#112 - def workspace_folders; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#4 -class LanguageServer::Protocol::Interface::InitializeResult - # @return [InitializeResult] a new instance of InitializeResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#5 - def initialize(capabilities:, server_info: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#30 - def attributes; end - - # The capabilities the language server provides. - # - # @return [ServerCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#18 - def capabilities; end - - # Information about the server. - # - # @return [{ name: string; version?: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#26 - def server_info; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#4 -class LanguageServer::Protocol::Interface::InitializedParams - # @return [InitializedParams] a new instance of InitializedParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#5 - def initialize; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#12 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#14 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#18 - def to_json(*args); end -end - -# Inlay hint information. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#7 -class LanguageServer::Protocol::Interface::InlayHint - # @return [InlayHint] a new instance of InlayHint - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#8 - def initialize(position:, label:, kind: T.unsafe(nil), text_edits: T.unsafe(nil), tooltip: T.unsafe(nil), padding_left: T.unsafe(nil), padding_right: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#110 - def attributes; end - - # A data entry field that is preserved on an inlay hint between - # a `textDocument/inlayHint` and a `inlayHint/resolve` request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#106 - def data; end - - # The kind of this hint. Can be omitted in which case the client - # should fall back to a reasonable default. - # - # @return [InlayHintKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#47 - def kind; end - - # The label of this hint. A human readable string or an array of - # InlayHintLabelPart label parts. - # - # *Note* that neither the string nor the label part can be empty. - # - # @return [string | InlayHintLabelPart[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#38 - def label; end - - # Render padding before the hint. - # - # Note: Padding should use the editor's background color, not the - # background color of the hint itself. That means padding can be used - # to visually align/separate an inlay hint. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#85 - def padding_left; end - - # Render padding after the hint. - # - # Note: Padding should use the editor's background color, not the - # background color of the hint itself. That means padding can be used - # to visually align/separate an inlay hint. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#97 - def padding_right; end - - # The position of this hint. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#27 - def position; end - - # Optional text edits that are performed when accepting this inlay hint. - # - # *Note* that edits are expected to change the document so that the inlay - # hint (or its nearest variant) is now part of the document and the inlay - # hint itself is now obsolete. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#62 - def text_edits; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#112 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#116 - def to_json(*args); end - - # The tooltip text when you hover over this item. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#73 - def tooltip; end -end - -# Inlay hint client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlayHintClientCapabilities - # @return [InlayHintClientCapabilities] a new instance of InlayHintClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), resolve_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#34 - def attributes; end - - # Whether inlay hints support dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#21 - def dynamic_registration; end - - # Indicates which properties a client can resolve lazily on an inlay - # hint. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#30 - def resolve_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#40 - def to_json(*args); end -end - -# An inlay hint label part allows for interactive and composite labels -# of inlay hints. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#8 -class LanguageServer::Protocol::Interface::InlayHintLabelPart - # @return [InlayHintLabelPart] a new instance of InlayHintLabelPart - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#9 - def initialize(value:, tooltip: T.unsafe(nil), location: T.unsafe(nil), command: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#67 - def attributes; end - - # An optional command for this label part. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#63 - def command; end - - # An optional source code location that represents this - # label part. - # - # The editor will use this location for the hover and for code navigation - # features: This part will become a clickable link that resolves to the - # definition of the symbol at the given location (not necessarily the - # location itself), it shows the hover that shows at the given location, - # and it shows a context menu with further code navigation commands. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#52 - def location; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#73 - def to_json(*args); end - - # The tooltip text when you hover over this label part. Depending on - # the client capability `inlayHint.resolveSupport` clients might resolve - # this property late using the resolve request. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#34 - def tooltip; end - - # The value of this label part. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#24 - def value; end -end - -# Inlay hint options used during static registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#7 -class LanguageServer::Protocol::Interface::InlayHintOptions - # @return [InlayHintOptions] a new instance of InlayHintOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#31 - def attributes; end - - # The server provides support to resolve additional - # information for an inlay hint item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#27 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#37 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#18 - def work_done_progress; end -end - -# A parameter literal used in inlay hint requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#7 -class LanguageServer::Protocol::Interface::InlayHintParams - # @return [InlayHintParams] a new instance of InlayHintParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#8 - def initialize(text_document:, range:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#42 - def attributes; end - - # The visible document range for which inlay hints should be computed. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#38 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#30 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#44 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#48 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#22 - def work_done_token; end -end - -# Inlay hint options used during static or dynamic registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#7 -class LanguageServer::Protocol::Interface::InlayHintRegistrationOptions - # @return [InlayHintRegistrationOptions] a new instance of InlayHintRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#8 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#51 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#38 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#47 - def id; end - - # The server provides support to resolve additional - # information for an inlay hint item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#29 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#57 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#20 - def work_done_progress; end -end - -# Client workspace capabilities specific to inlay hints. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities - # @return [InlayHintWorkspaceClientCapabilities] a new instance of InlayHintWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # inlay hints currently shown. It should be used with absolute care and - # is useful for situation where a server for example detects a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# Client capabilities specific to inline values. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlineValueClientCapabilities - # @return [InlineValueClientCapabilities] a new instance of InlineValueClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#25 - def attributes; end - - # Whether implementation supports dynamic registration for inline - # value providers. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#21 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#4 -class LanguageServer::Protocol::Interface::InlineValueContext - # @return [InlineValueContext] a new instance of InlineValueContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#5 - def initialize(frame_id:, stopped_location:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#32 - def attributes; end - - # The stack frame (as a DAP Id) where the execution has stopped. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#18 - def frame_id; end - - # The document range where execution has stopped. - # Typically the end position of the range denotes the line where the - # inline values are shown. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#28 - def stopped_location; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#38 - def to_json(*args); end -end - -# Provide an inline value through an expression evaluation. -# -# If only a range is specified, the expression will be extracted from the -# underlying document. -# -# An optional expression can be used to override the extracted expression. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#12 -class LanguageServer::Protocol::Interface::InlineValueEvaluatableExpression - # @return [InlineValueEvaluatableExpression] a new instance of InlineValueEvaluatableExpression - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#13 - def initialize(range:, expression: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#40 - def attributes; end - - # If specified the expression overrides the extracted expression. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#36 - def expression; end - - # The document range for which the inline value applies. - # The range is used to extract the evaluatable expression from the - # underlying document. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#28 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#46 - def to_json(*args); end -end - -# Inline value options used during static registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#7 -class LanguageServer::Protocol::Interface::InlineValueOptions - # @return [InlineValueOptions] a new instance of InlineValueOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#27 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#17 - def work_done_progress; end -end - -# A parameter literal used in inline value requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#7 -class LanguageServer::Protocol::Interface::InlineValueParams - # @return [InlineValueParams] a new instance of InlineValueParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#8 - def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#52 - def attributes; end - - # Additional information about the context in which inline values were - # requested. - # - # @return [InlineValueContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#48 - def context; end - - # The document range for which inline values should be computed. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#39 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#31 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#58 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#23 - def work_done_token; end -end - -# Inline value options used during static or dynamic registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#7 -class LanguageServer::Protocol::Interface::InlineValueRegistrationOptions - # @return [InlineValueRegistrationOptions] a new instance of InlineValueRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#8 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#41 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#28 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#37 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#43 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#47 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#19 - def work_done_progress; end -end - -# Provide inline value as text. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#7 -class LanguageServer::Protocol::Interface::InlineValueText - # @return [InlineValueText] a new instance of InlineValueText - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#8 - def initialize(range:, text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#33 - def attributes; end - - # The document range for which the inline value applies. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#21 - def range; end - - # The text of the inline value. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#29 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#39 - def to_json(*args); end -end - -# Provide inline value through a variable lookup. -# -# If only a range is specified, the variable name will be extracted from -# the underlying document. -# -# An optional variable name can be used to override the extracted name. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#12 -class LanguageServer::Protocol::Interface::InlineValueVariableLookup - # @return [InlineValueVariableLookup] a new instance of InlineValueVariableLookup - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#13 - def initialize(range:, case_sensitive_lookup:, variable_name: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#49 - def attributes; end - - # How to perform the lookup. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#45 - def case_sensitive_lookup; end - - # The document range for which the inline value applies. - # The range is used to extract the variable name from the underlying - # document. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#29 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#55 - def to_json(*args); end - - # If specified the name of the variable to look up. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#37 - def variable_name; end -end - -# Client workspace capabilities specific to inline values. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlineValueWorkspaceClientCapabilities - # @return [InlineValueWorkspaceClientCapabilities] a new instance of InlineValueWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # inline values currently shown. It should be used with absolute care and - # is useful for situation where a server for example detect a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# A special text edit to provide an insert and a replace operation. -# -# source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#7 -class LanguageServer::Protocol::Interface::InsertReplaceEdit - # @return [InsertReplaceEdit] a new instance of InsertReplaceEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#8 - def initialize(new_text:, insert:, replace:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#42 - def attributes; end - - # The range if the insert is requested - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#30 - def insert; end - - # The string to be inserted. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#22 - def new_text; end - - # The range if the replace is requested. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#38 - def replace; end - - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#44 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#48 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeClientCapabilities - # @return [LinkedEditingRangeClientCapabilities] a new instance of LinkedEditingRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#24 - def attributes; end - - # Whether the implementation supports dynamic registration. - # If this is set to `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeOptions - # @return [LinkedEditingRangeOptions] a new instance of LinkedEditingRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeParams - # @return [LinkedEditingRangeParams] a new instance of LinkedEditingRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeRegistrationOptions - # @return [LinkedEditingRangeRegistrationOptions] a new instance of LinkedEditingRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRanges - # @return [LinkedEditingRanges] a new instance of LinkedEditingRanges - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#5 - def initialize(ranges:, word_pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#34 - def attributes; end - - # A list of ranges that can be renamed together. The ranges must have - # identical length and contain identical text content. The ranges cannot - # overlap. - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#20 - def ranges; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#40 - def to_json(*args); end - - # An optional word pattern (regular expression) that describes valid - # contents for the given ranges. If no pattern is provided, the client - # configuration's word pattern will be used. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#30 - def word_pattern; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/location.rb#4 -class LanguageServer::Protocol::Interface::Location - # @return [Location] a new instance of Location - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#5 - def initialize(uri:, range:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#24 - def attributes; end - - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#20 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#30 - def to_json(*args); end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#15 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#4 -class LanguageServer::Protocol::Interface::LocationLink - # @return [LocationLink] a new instance of LocationLink - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#5 - def initialize(target_uri:, target_range:, target_selection_range:, origin_selection_range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#56 - def attributes; end - - # Span of the origin of this link. - # - # Used as the underlined span for mouse interaction. Defaults to the word - # range at the mouse position. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#23 - def origin_selection_range; end - - # The full target range of this link. If the target for example is a symbol - # then target range is the range enclosing this symbol not including - # leading/trailing whitespace but everything else like comments. This - # information is typically used to highlight the range in the editor. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#42 - def target_range; end - - # The range that should be selected and revealed when this link is being - # followed, e.g the name of a function. Must be contained by the - # `targetRange`. See also `DocumentSymbol#range` - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#52 - def target_selection_range; end - - # The target resource identifier of this link. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#31 - def target_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#62 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#4 -class LanguageServer::Protocol::Interface::LogMessageParams - # @return [LogMessageParams] a new instance of LogMessageParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#5 - def initialize(type:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#30 - def attributes; end - - # The actual message - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#26 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#36 - def to_json(*args); end - - # The message type. See {@link MessageType} - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#18 - def type; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#4 -class LanguageServer::Protocol::Interface::LogTraceParams - # @return [LogTraceParams] a new instance of LogTraceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#5 - def initialize(message:, verbose: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#31 - def attributes; end - - # The message to be logged. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#18 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#37 - def to_json(*args); end - - # Additional information that can be computed if the `trace` configuration - # is set to `'verbose'` - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#27 - def verbose; end -end - -# A `MarkupContent` literal represents a string value which content is -# interpreted base on its kind flag. Currently the protocol supports -# `plaintext` and `markdown` as markup kinds. -# -# If the kind is `markdown` then the value can contain fenced code blocks like -# in GitHub issues. -# -# Here is an example how such a string can be constructed using -# JavaScript / TypeScript: -# ```typescript -# let markdown: MarkdownContent = { -# kind: MarkupKind.Markdown, -# value: [ -# '# Header', -# 'Some text', -# '```typescript', -# 'someCode();', -# '```' -# ].join('\n') -# }; -# ``` -# -# *Please Note* that clients might sanitize the return markdown. A client could -# decide to remove HTML from the markdown to avoid script execution. -# -# source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#30 -class LanguageServer::Protocol::Interface::MarkupContent - # @return [MarkupContent] a new instance of MarkupContent - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#31 - def initialize(kind:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#56 - def attributes; end - - # The type of the Markup - # - # @return [MarkupKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#44 - def kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#62 - def to_json(*args); end - - # The content itself - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#52 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/message.rb#4 -class LanguageServer::Protocol::Interface::Message - # @return [Message] a new instance of Message - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#5 - def initialize(jsonrpc:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#18 - def attributes; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#14 - def jsonrpc; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#4 -class LanguageServer::Protocol::Interface::MessageActionItem - # @return [MessageActionItem] a new instance of MessageActionItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#5 - def initialize(title:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#21 - def attributes; end - - # A short title like 'Retry', 'Open Log' etc. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#17 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#27 - def to_json(*args); end -end - -# Moniker definition to match LSIF 0.5 moniker definition. -# -# source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#7 -class LanguageServer::Protocol::Interface::Moniker - # @return [Moniker] a new instance of Moniker - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#8 - def initialize(scheme:, identifier:, unique:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#52 - def attributes; end - - # The identifier of the moniker. The value is opaque in LSIF however - # schema owners are allowed to define the structure if they want. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#32 - def identifier; end - - # The moniker kind if known. - # - # @return [MonikerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#48 - def kind; end - - # The scheme of the moniker. For example tsc or .Net - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#23 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#58 - def to_json(*args); end - - # The scope in which the moniker is unique - # - # @return [UniquenessLevel] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#40 - def unique; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::MonikerClientCapabilities - # @return [MonikerClientCapabilities] a new instance of MonikerClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#4 -class LanguageServer::Protocol::Interface::MonikerOptions - # @return [MonikerOptions] a new instance of MonikerOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#4 -class LanguageServer::Protocol::Interface::MonikerParams - # @return [MonikerParams] a new instance of MonikerParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#4 -class LanguageServer::Protocol::Interface::MonikerRegistrationOptions - # @return [MonikerRegistrationOptions] a new instance of MonikerRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#24 - def work_done_progress; end -end - -# A notebook cell. -# -# A cell's document URI must be unique across ALL notebook -# cells and can therefore be used to uniquely identify a -# notebook cell or the cell's text document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#11 -class LanguageServer::Protocol::Interface::NotebookCell - # @return [NotebookCell] a new instance of NotebookCell - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#12 - def initialize(kind:, document:, metadata: T.unsafe(nil), execution_summary: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#57 - def attributes; end - - # The URI of the cell's text document - # content. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#36 - def document; end - - # Additional execution summary information - # if supported by the client. - # - # @return [ExecutionSummary] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#53 - def execution_summary; end - - # The cell's kind - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#27 - def kind; end - - # Additional metadata stored with the cell. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#44 - def metadata; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#63 - def to_json(*args); end -end - -# A change describing how to move a `NotebookCell` -# array from state S to S'. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#8 -class LanguageServer::Protocol::Interface::NotebookCellArrayChange - # @return [NotebookCellArrayChange] a new instance of NotebookCellArrayChange - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#9 - def initialize(start:, delete_count:, cells: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#43 - def attributes; end - - # The new cells, if any - # - # @return [NotebookCell[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#39 - def cells; end - - # The deleted cells - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#31 - def delete_count; end - - # The start offset of the cell that changed. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#23 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#49 - def to_json(*args); end -end - -# A notebook cell text document filter denotes a cell text -# document by different properties. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#8 -class LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter - # @return [NotebookCellTextDocumentFilter] a new instance of NotebookCellTextDocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#9 - def initialize(notebook:, language: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#40 - def attributes; end - - # A language id like `python`. - # - # Will be matched against the language id of the - # notebook cell document. '*' matches every language. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#36 - def language; end - - # A filter that matches against the notebook - # containing the notebook cell. If a string - # value is provided it matches against the - # notebook type. '*' matches every notebook. - # - # @return [string | NotebookDocumentFilter] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#25 - def notebook; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#46 - def to_json(*args); end -end - -# A notebook document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocument - # @return [NotebookDocument] a new instance of NotebookDocument - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#8 - def initialize(uri:, notebook_type:, version:, cells:, metadata: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#62 - def attributes; end - - # The cells of a notebook. - # - # @return [NotebookCell[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#58 - def cells; end - - # Additional metadata stored with the notebook - # document. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#50 - def metadata; end - - # The type of the notebook. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#32 - def notebook_type; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#64 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#68 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#24 - def uri; end - - # The version number of this document (it will increase after each - # change, including undo/redo). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#41 - def version; end -end - -# A change event for a notebook document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentChangeEvent - # @return [NotebookDocumentChangeEvent] a new instance of NotebookDocumentChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#8 - def initialize(metadata: T.unsafe(nil), cells: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#33 - def attributes; end - - # Changes to cells - # - # @return [{ structure?: { array: NotebookCellArrayChange; didOpen?: TextDocumentItem[]; didClose?: TextDocumentIdentifier[]; }; data?: NotebookCell[]; textContent?: { ...; }[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#29 - def cells; end - - # The changed meta data if any. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#21 - def metadata; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#39 - def to_json(*args); end -end - -# Capabilities specific to the notebook document support. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentClientCapabilities - # @return [NotebookDocumentClientCapabilities] a new instance of NotebookDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#8 - def initialize(synchronization:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#24 - def attributes; end - - # Capabilities specific to notebook document synchronization - # - # @return [NotebookDocumentSyncClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#20 - def synchronization; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#30 - def to_json(*args); end -end - -# A notebook document filter denotes a notebook document by -# different properties. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#8 -class LanguageServer::Protocol::Interface::NotebookDocumentFilter - # @return [NotebookDocumentFilter] a new instance of NotebookDocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#9 - def initialize(notebook_type: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#67 - def attributes; end - - # The type of the enclosing notebook. - # - # --- OR --- - # - # The type of the enclosing notebook. - # - # --- OR --- - # - # The type of the enclosing notebook. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#31 - def notebook_type; end - - # A glob pattern. - # - # --- OR --- - # - # A glob pattern. - # - # --- OR --- - # - # A glob pattern. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#63 - def pattern; end - - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # --- OR --- - # - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # --- OR --- - # - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#47 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#73 - def to_json(*args); end -end - -# A literal to identify a notebook document in the client. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentIdentifier - # @return [NotebookDocumentIdentifier] a new instance of NotebookDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#30 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#20 - def uri; end -end - -# Notebook specific client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncClientCapabilities - # @return [NotebookDocumentSyncClientCapabilities] a new instance of NotebookDocumentSyncClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), execution_summary_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#36 - def attributes; end - - # Whether implementation supports dynamic registration. If this is - # set to `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#24 - def dynamic_registration; end - - # The client supports sending execution summary data per cell. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#32 - def execution_summary_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#42 - def to_json(*args); end -end - -# Options specific to a notebook plus its cells -# to be synced to the server. -# -# If a selector provides a notebook document -# filter but no cell selector all cells of a -# matching notebook document will be synced. -# -# If a selector provides no notebook document -# filter but only a cell selector all notebook -# documents that contain at least one matching -# cell will be synced. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#17 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncOptions - # @return [NotebookDocumentSyncOptions] a new instance of NotebookDocumentSyncOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#18 - def initialize(notebook_selector:, save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#44 - def attributes; end - - # The notebooks to be synced - # - # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#31 - def notebook_selector; end - - # Whether save notification should be forwarded to - # the server. Will only be honored if mode === `notebook`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#40 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#50 - def to_json(*args); end -end - -# Registration options specific to a notebook. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncRegistrationOptions - # @return [NotebookDocumentSyncRegistrationOptions] a new instance of NotebookDocumentSyncRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#8 - def initialize(notebook_selector:, save: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#44 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#40 - def id; end - - # The notebooks to be synced - # - # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#22 - def notebook_selector; end - - # Whether save notification should be forwarded to - # the server. Will only be honored if mode === `notebook`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#31 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#4 -class LanguageServer::Protocol::Interface::NotificationMessage - # @return [NotificationMessage] a new instance of NotificationMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#5 - def initialize(jsonrpc:, method:, params: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#36 - def attributes; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#16 - def jsonrpc; end - - # The method to be invoked. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#24 - def method; end - - # The notification's params. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#32 - def params; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#42 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier - # @return [OptionalVersionedTextDocumentIdentifier] a new instance of OptionalVersionedTextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#5 - def initialize(uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#38 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#44 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#18 - def uri; end - - # The version number of this document. If an optional versioned text document - # identifier is sent from the server to the client and the file is not - # open in the editor (the server has not received an open notification - # before) the server can send `null` to indicate that the version is - # known and the content on disk is the master (as specified with document - # content ownership). - # - # The version number of a document will increase after each change, - # including undo/redo. The number doesn't need to be consecutive. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#34 - def version; end -end - -# Represents a parameter of a callable-signature. A parameter can -# have a label and a doc-comment. -# -# source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#8 -class LanguageServer::Protocol::Interface::ParameterInformation - # @return [ParameterInformation] a new instance of ParameterInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#9 - def initialize(label:, documentation: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#44 - def attributes; end - - # The human-readable doc-comment of this parameter. Will be shown - # in the UI but can be omitted. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#40 - def documentation; end - - # The label of this parameter information. - # - # Either a string or an inclusive start and exclusive end offsets within - # its containing signature label. (see SignatureInformation.label). The - # offsets are based on a UTF-16 string representation as `Position` and - # `Range` does. - # - # *Note*: a label of type string should be a substring of its containing - # signature label. Its intended use case is to highlight the parameter - # label part in the `SignatureInformation.label`. - # - # @return [string | [number, number]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#31 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#4 -class LanguageServer::Protocol::Interface::PartialResultParams - # @return [PartialResultParams] a new instance of PartialResultParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#5 - def initialize(partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#22 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#18 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#24 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#28 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/position.rb#4 -class LanguageServer::Protocol::Interface::Position - # @return [Position] a new instance of Position - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#5 - def initialize(line:, character:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#34 - def attributes; end - - # Character offset on a line in a document (zero-based). The meaning of this - # offset is determined by the negotiated `PositionEncodingKind`. - # - # If the character value is greater than the line length it defaults back - # to the line length. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#30 - def character; end - - # Line position in a document (zero-based). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#18 - def line; end - - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#4 -class LanguageServer::Protocol::Interface::PrepareRenameParams - # @return [PrepareRenameParams] a new instance of PrepareRenameParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#35 - def work_done_token; end -end - -# A previous result id in a workspace pull request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#7 -class LanguageServer::Protocol::Interface::PreviousResultId - # @return [PreviousResultId] a new instance of PreviousResultId - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#8 - def initialize(uri:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#34 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#40 - def to_json(*args); end - - # The URI for which the client knows a - # result id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#22 - def uri; end - - # The value of the previous result id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#30 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#4 -class LanguageServer::Protocol::Interface::ProgressParams - # @return [ProgressParams] a new instance of ProgressParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#5 - def initialize(token:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#30 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#36 - def to_json(*args); end - - # The progress token provided by the client or server. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#18 - def token; end - - # The progress data. - # - # @return [T] - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#26 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities - # @return [PublishDiagnosticsClientCapabilities] a new instance of PublishDiagnosticsClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#5 - def initialize(related_information: T.unsafe(nil), tag_support: T.unsafe(nil), version_support: T.unsafe(nil), code_description_support: T.unsafe(nil), data_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#61 - def attributes; end - - # Client supports a codeDescription property - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#47 - def code_description_support; end - - # Whether code action supports the `data` property which is - # preserved between a `textDocument/publishDiagnostics` and - # `textDocument/codeAction` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#57 - def data_support; end - - # Whether the clients accepts diagnostics with related information. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#21 - def related_information; end - - # Client supports the tag property to provide meta data about a diagnostic. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: DiagnosticTag[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#30 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#67 - def to_json(*args); end - - # Whether the client interprets the version property of the - # `textDocument/publishDiagnostics` notification's parameter. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#39 - def version_support; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#4 -class LanguageServer::Protocol::Interface::PublishDiagnosticsParams - # @return [PublishDiagnosticsParams] a new instance of PublishDiagnosticsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#5 - def initialize(uri:, diagnostics:, version: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#40 - def attributes; end - - # An array of diagnostic information items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#36 - def diagnostics; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#46 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#19 - def uri; end - - # Optional the version number of the document the diagnostics are published - # for. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#28 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/range.rb#4 -class LanguageServer::Protocol::Interface::Range - # @return [Range] a new instance of Range - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#5 - def initialize(start:, end:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#30 - def attributes; end - - # The range's end position. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#26 - def end; end - - # The range's start position. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#18 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ReferenceClientCapabilities - # @return [ReferenceClientCapabilities] a new instance of ReferenceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#21 - def attributes; end - - # Whether references supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#4 -class LanguageServer::Protocol::Interface::ReferenceContext - # @return [ReferenceContext] a new instance of ReferenceContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#5 - def initialize(include_declaration:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#21 - def attributes; end - - # Include the declaration of the current symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#17 - def include_declaration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#4 -class LanguageServer::Protocol::Interface::ReferenceOptions - # @return [ReferenceOptions] a new instance of ReferenceOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#4 -class LanguageServer::Protocol::Interface::ReferenceParams - # @return [ReferenceParams] a new instance of ReferenceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#5 - def initialize(text_document:, position:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#55 - def attributes; end - - # @return [ReferenceContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#51 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#46 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#29 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#57 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#61 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#37 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#4 -class LanguageServer::Protocol::Interface::ReferenceRegistrationOptions - # @return [ReferenceRegistrationOptions] a new instance of ReferenceRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#24 - def work_done_progress; end -end - -# General parameters to register for a capability. -# -# source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#7 -class LanguageServer::Protocol::Interface::Registration - # @return [Registration] a new instance of Registration - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#8 - def initialize(id:, method:, register_options: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#43 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#23 - def id; end - - # The method / capability to register for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#31 - def method; end - - # Options necessary for the registration. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#39 - def register_options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#49 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#4 -class LanguageServer::Protocol::Interface::RegistrationParams - # @return [RegistrationParams] a new instance of RegistrationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#5 - def initialize(registrations:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#18 - def attributes; end - - # @return [Registration[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#14 - def registrations; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#24 - def to_json(*args); end -end - -# Client capabilities specific to regular expressions. -# -# source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::RegularExpressionsClientCapabilities - # @return [RegularExpressionsClientCapabilities] a new instance of RegularExpressionsClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#8 - def initialize(engine:, version: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#33 - def attributes; end - - # The engine's name. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#21 - def engine; end - - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#39 - def to_json(*args); end - - # The engine's version. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#29 - def version; end -end - -# A full diagnostic report with a set of related documents. -# -# source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport - # @return [RelatedFullDocumentDiagnosticReport] a new instance of RelatedFullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, result_id: T.unsafe(nil), related_documents: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#57 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#41 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#23 - def kind; end - - # Diagnostics of related documents. This information is useful - # in programming languages where code in a file A can generate - # diagnostics in a file B which A depends on. An example of - # such a language is C/C++ where marco definitions in a file - # a.cpp and result in errors in a header file b.hpp. - # - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#53 - def related_documents; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#33 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#63 - def to_json(*args); end -end - -# An unchanged diagnostic report with a set of related documents. -# -# source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport - # @return [RelatedUnchangedDocumentDiagnosticReport] a new instance of RelatedUnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#8 - def initialize(kind:, result_id:, related_documents: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#50 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#25 - def kind; end - - # Diagnostics of related documents. This information is useful - # in programming languages where code in a file A can generate - # diagnostics in a file B which A depends on. An example of - # such a language is C/C++ where marco definitions in a file - # a.cpp and result in errors in a header file b.hpp. - # - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#46 - def related_documents; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#56 - def to_json(*args); end -end - -# A relative pattern is a helper to construct glob patterns that are matched -# relatively to a base URI. The common value for a `baseUri` is a workspace -# folder root, but it can be another absolute URI as well. -# -# source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#9 -class LanguageServer::Protocol::Interface::RelativePattern - # @return [RelativePattern] a new instance of RelativePattern - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#10 - def initialize(base_uri:, pattern:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#36 - def attributes; end - - # A workspace folder or a base URI to which this pattern will be matched - # against relatively. - # - # @return [string | WorkspaceFolder] - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#24 - def base_uri; end - - # The actual glob pattern; - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#32 - def pattern; end - - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#42 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::RenameClientCapabilities - # @return [RenameClientCapabilities] a new instance of RenameClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), prepare_support: T.unsafe(nil), prepare_support_default_behavior: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#57 - def attributes; end - - # Whether rename supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#20 - def dynamic_registration; end - - # Whether the client honors the change annotations in - # text edits and resource operations returned via the - # rename request's workspace edit by for example presenting - # the workspace edit in the user interface and asking - # for confirmation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#53 - def honors_change_annotations; end - - # Client supports testing for validity of rename operations - # before execution. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#29 - def prepare_support; end - - # Client supports the default behavior result - # (`{ defaultBehavior: boolean }`). - # - # The value indicates the default behavior used by the - # client. - # - # @return [1] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#41 - def prepare_support_default_behavior; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#63 - def to_json(*args); end -end - -# Rename file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#7 -class LanguageServer::Protocol::Interface::RenameFile - # @return [RenameFile] a new instance of RenameFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#8 - def initialize(kind:, old_uri:, new_uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#56 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#60 - def attributes; end - - # A rename - # - # @return ["rename"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#24 - def kind; end - - # The new location. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#40 - def new_uri; end - - # The old (existing) location. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#32 - def old_uri; end - - # Rename options. - # - # @return [RenameFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#48 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#66 - def to_json(*args); end -end - -# Rename file options -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#7 -class LanguageServer::Protocol::Interface::RenameFileOptions - # @return [RenameFileOptions] a new instance of RenameFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#8 - def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#33 - def attributes; end - - # Ignores if target exists. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#29 - def ignore_if_exists; end - - # Overwrite target if existing. Overwrite wins over `ignoreIfExists` - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#21 - def overwrite; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated renames -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#8 -class LanguageServer::Protocol::Interface::RenameFilesParams - # @return [RenameFilesParams] a new instance of RenameFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#26 - def attributes; end - - # An array of all files/folders renamed in this operation. When a folder - # is renamed, only the folder will be included, and not its children. - # - # @return [FileRename[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#22 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#28 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#32 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#4 -class LanguageServer::Protocol::Interface::RenameOptions - # @return [RenameOptions] a new instance of RenameOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#27 - def attributes; end - - # Renames should be checked and tested before being executed. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#23 - def prepare_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#4 -class LanguageServer::Protocol::Interface::RenameParams - # @return [RenameParams] a new instance of RenameParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#5 - def initialize(text_document:, position:, new_name:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#50 - def attributes; end - - # The new name of the symbol. If the given name is not valid the - # request must return a [ResponseError](#ResponseError) with an - # appropriate message set. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#46 - def new_name; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#4 -class LanguageServer::Protocol::Interface::RenameRegistrationOptions - # @return [RenameRegistrationOptions] a new instance of RenameRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#20 - def document_selector; end - - # Renames should be checked and tested before being executed. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#33 - def prepare_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#4 -class LanguageServer::Protocol::Interface::RequestMessage - # @return [RequestMessage] a new instance of RequestMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#5 - def initialize(jsonrpc:, id:, method:, params: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#45 - def attributes; end - - # The request id. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#25 - def id; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#17 - def jsonrpc; end - - # The method to be invoked. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#33 - def method; end - - # The method's params. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#41 - def params; end - - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#4 -class LanguageServer::Protocol::Interface::ResponseError - # @return [ResponseError] a new instance of ResponseError - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#5 - def initialize(code:, message:, data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#40 - def attributes; end - - # A number indicating the error type that occurred. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#19 - def code; end - - # A primitive or structured value that contains additional - # information about the error. Can be omitted. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#36 - def data; end - - # A string providing a short description of the error. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#27 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#4 -class LanguageServer::Protocol::Interface::ResponseMessage - # @return [ResponseMessage] a new instance of ResponseMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#5 - def initialize(jsonrpc:, id:, result: T.unsafe(nil), error: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#46 - def attributes; end - - # The error object in case a request fails. - # - # @return [ResponseError] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#42 - def error; end - - # The request id. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#25 - def id; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#17 - def jsonrpc; end - - # The result of a request. This member is REQUIRED on success. - # This member MUST NOT exist if there was an error invoking the method. - # - # @return [string | number | boolean | object] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#34 - def result; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#48 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#52 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#4 -class LanguageServer::Protocol::Interface::SaveOptions - # @return [SaveOptions] a new instance of SaveOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#5 - def initialize(include_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#21 - def attributes; end - - # The client is supposed to include the content on save. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#17 - def include_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#4 -class LanguageServer::Protocol::Interface::SelectionRange - # @return [SelectionRange] a new instance of SelectionRange - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#5 - def initialize(range:, parent: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#31 - def attributes; end - - # The parent selection range containing this range. Therefore - # `parent.range` must contain `this.range`. - # - # @return [SelectionRange] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#27 - def parent; end - - # The [range](#Range) of this selection range. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#18 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeClientCapabilities - # @return [SelectionRangeClientCapabilities] a new instance of SelectionRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration for selection range - # providers. If this is set to `true` the client supports the new - # `SelectionRangeRegistrationOptions` return value for the corresponding - # server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeOptions - # @return [SelectionRangeOptions] a new instance of SelectionRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeParams - # @return [SelectionRangeParams] a new instance of SelectionRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#5 - def initialize(text_document:, positions:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#29 - def partial_result_token; end - - # The positions inside the text document. - # - # @return [Position[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#45 - def positions; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeRegistrationOptions - # @return [SelectionRangeRegistrationOptions] a new instance of SelectionRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#25 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokens - # @return [SemanticTokens] a new instance of SemanticTokens - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#5 - def initialize(data:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#33 - def attributes; end - - # The actual tokens. - # - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#29 - def data; end - - # An optional result id. If provided and clients support delta updating - # the client will include the result id in the next semantic token request. - # A server can then instead of computing all semantic tokens again simply - # send a delta. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#21 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensClientCapabilities - # @return [SemanticTokensClientCapabilities] a new instance of SemanticTokensClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#5 - def initialize(requests:, token_types:, token_modifiers:, formats:, dynamic_registration: T.unsafe(nil), overlapping_token_support: T.unsafe(nil), multiline_token_support: T.unsafe(nil), server_cancel_support: T.unsafe(nil), augments_syntax_tokens: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#113 - def attributes; end - - # Whether the client uses semantic tokens to augment existing - # syntax tokens. If set to `true` client side created syntax - # tokens and semantic tokens are both used for colorization. If - # set to `false` the client only uses the returned semantic tokens - # for colorization. - # - # If the value is `undefined` then the client behavior is not - # specified. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#109 - def augments_syntax_tokens; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#28 - def dynamic_registration; end - - # The formats the clients supports. - # - # @return ["relative"[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#67 - def formats; end - - # Whether the client supports tokens that can span multiple lines. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#83 - def multiline_token_support; end - - # Whether the client supports tokens that can overlap each other. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#75 - def overlapping_token_support; end - - # Which requests the client supports and might send to the server - # depending on the server's capability. Please note that clients might not - # show semantic tokens or degrade some of the user experience if a range - # or full request is advertised by the client but not provided by the - # server. If for example the client capability `requests.full` and - # `request.range` are both set to true but the server only provides a - # range provider the client might not render a minimap correctly or might - # even decide to not show any semantic tokens at all. - # - # @return [{ range?: boolean | {}; full?: boolean | { delta?: boolean; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#43 - def requests; end - - # Whether the client allows the server to actively cancel a - # semantic token request, e.g. supports returning - # ErrorCodes.ServerCancelled. If a server does the client - # needs to retrigger the request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#94 - def server_cancel_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#115 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#119 - def to_json(*args); end - - # The token modifiers that the client supports. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#59 - def token_modifiers; end - - # The token types that the client supports. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#51 - def token_types; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDelta - # @return [SemanticTokensDelta] a new instance of SemanticTokensDelta - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#5 - def initialize(edits:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#28 - def attributes; end - - # The semantic token edits to transform a previous result into a new - # result. - # - # @return [SemanticTokensEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#24 - def edits; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#15 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#34 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDeltaParams - # @return [SemanticTokensDeltaParams] a new instance of SemanticTokensDeltaParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#5 - def initialize(text_document:, previous_result_id:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#50 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#29 - def partial_result_token; end - - # The result id of a previous response. The result Id can either point to - # a full response or a delta response depending on what was received last. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#46 - def previous_result_id; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDeltaPartialResult - # @return [SemanticTokensDeltaPartialResult] a new instance of SemanticTokensDeltaPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#5 - def initialize(edits:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#18 - def attributes; end - - # @return [SemanticTokensEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#14 - def edits; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensEdit - # @return [SemanticTokensEdit] a new instance of SemanticTokensEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#5 - def initialize(start:, delete_count:, data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#39 - def attributes; end - - # The elements to insert. - # - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#35 - def data; end - - # The count of elements to remove. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#27 - def delete_count; end - - # The start offset of the edit. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#19 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#45 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensLegend - # @return [SemanticTokensLegend] a new instance of SemanticTokensLegend - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#5 - def initialize(token_types:, token_modifiers:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#30 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#36 - def to_json(*args); end - - # The token modifiers a server uses. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#26 - def token_modifiers; end - - # The token types a server uses. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#18 - def token_types; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensOptions - # @return [SemanticTokensOptions] a new instance of SemanticTokensOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#5 - def initialize(legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#46 - def attributes; end - - # Server supports providing semantic tokens for a full document. - # - # @return [boolean | { delta?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#42 - def full; end - - # The legend used by the server - # - # @return [SemanticTokensLegend] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#25 - def legend; end - - # Server supports providing semantic tokens for a specific range - # of a document. - # - # @return [boolean | {}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#34 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#48 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#52 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#17 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensParams - # @return [SemanticTokensParams] a new instance of SemanticTokensParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensPartialResult - # @return [SemanticTokensPartialResult] a new instance of SemanticTokensPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#5 - def initialize(data:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#18 - def attributes; end - - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#14 - def data; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensRangeParams - # @return [SemanticTokensRangeParams] a new instance of SemanticTokensRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#5 - def initialize(text_document:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#29 - def partial_result_token; end - - # The range the semantic tokens are requested for. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#45 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions - # @return [SemanticTokensRegistrationOptions] a new instance of SemanticTokensRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#5 - def initialize(document_selector:, legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#66 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#23 - def document_selector; end - - # Server supports providing semantic tokens for a full document. - # - # @return [boolean | { delta?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#53 - def full; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#62 - def id; end - - # The legend used by the server - # - # @return [SemanticTokensLegend] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#36 - def legend; end - - # Server supports providing semantic tokens for a specific range - # of a document. - # - # @return [boolean | {}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#45 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#72 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#28 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensWorkspaceClientCapabilities - # @return [SemanticTokensWorkspaceClientCapabilities] a new instance of SemanticTokensWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#5 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#27 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # semantic tokens currently shown. It should be used with absolute care - # and is useful for situation where a server for example detect a project - # wide change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#23 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#33 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ServerCapabilities - # @return [ServerCapabilities] a new instance of ServerCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#5 - def initialize(position_encoding: T.unsafe(nil), text_document_sync: T.unsafe(nil), notebook_document_sync: T.unsafe(nil), completion_provider: T.unsafe(nil), hover_provider: T.unsafe(nil), signature_help_provider: T.unsafe(nil), declaration_provider: T.unsafe(nil), definition_provider: T.unsafe(nil), type_definition_provider: T.unsafe(nil), implementation_provider: T.unsafe(nil), references_provider: T.unsafe(nil), document_highlight_provider: T.unsafe(nil), document_symbol_provider: T.unsafe(nil), code_action_provider: T.unsafe(nil), code_lens_provider: T.unsafe(nil), document_link_provider: T.unsafe(nil), color_provider: T.unsafe(nil), document_formatting_provider: T.unsafe(nil), document_range_formatting_provider: T.unsafe(nil), document_on_type_formatting_provider: T.unsafe(nil), rename_provider: T.unsafe(nil), folding_range_provider: T.unsafe(nil), execute_command_provider: T.unsafe(nil), selection_range_provider: T.unsafe(nil), linked_editing_range_provider: T.unsafe(nil), call_hierarchy_provider: T.unsafe(nil), semantic_tokens_provider: T.unsafe(nil), moniker_provider: T.unsafe(nil), type_hierarchy_provider: T.unsafe(nil), inline_value_provider: T.unsafe(nil), inlay_hint_provider: T.unsafe(nil), diagnostic_provider: T.unsafe(nil), workspace_symbol_provider: T.unsafe(nil), workspace: T.unsafe(nil), experimental: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#340 - def attributes; end - - # The server provides call hierarchy support. - # - # @return [boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#264 - def call_hierarchy_provider; end - - # The server provides code actions. The `CodeActionOptions` return type is - # only valid if the client signals code action literal support via the - # property `textDocument.codeAction.codeActionLiteralSupport`. - # - # @return [boolean | CodeActionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#166 - def code_action_provider; end - - # The server provides code lens. - # - # @return [CodeLensOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#174 - def code_lens_provider; end - - # The server provides color provider support. - # - # @return [boolean | DocumentColorOptions | DocumentColorRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#190 - def color_provider; end - - # The server provides completion support. - # - # @return [CompletionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#84 - def completion_provider; end - - # The server provides go to declaration support. - # - # @return [boolean | DeclarationOptions | DeclarationRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#108 - def declaration_provider; end - - # The server provides goto definition support. - # - # @return [boolean | DefinitionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#116 - def definition_provider; end - - # The server has support for pull model diagnostics. - # - # @return [DiagnosticOptions | DiagnosticRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#312 - def diagnostic_provider; end - - # The server provides document formatting. - # - # @return [boolean | DocumentFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#198 - def document_formatting_provider; end - - # The server provides document highlight support. - # - # @return [boolean | DocumentHighlightOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#148 - def document_highlight_provider; end - - # The server provides document link support. - # - # @return [DocumentLinkOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#182 - def document_link_provider; end - - # The server provides document formatting on typing. - # - # @return [DocumentOnTypeFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#214 - def document_on_type_formatting_provider; end - - # The server provides document range formatting. - # - # @return [boolean | DocumentRangeFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#206 - def document_range_formatting_provider; end - - # The server provides document symbol support. - # - # @return [boolean | DocumentSymbolOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#156 - def document_symbol_provider; end - - # The server provides execute command support. - # - # @return [ExecuteCommandOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#240 - def execute_command_provider; end - - # Experimental server capabilities. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#336 - def experimental; end - - # The server provides folding provider support. - # - # @return [boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#232 - def folding_range_provider; end - - # The server provides hover support. - # - # @return [boolean | HoverOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#92 - def hover_provider; end - - # The server provides goto implementation support. - # - # @return [boolean | ImplementationOptions | ImplementationRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#132 - def implementation_provider; end - - # The server provides inlay hints. - # - # @return [boolean | InlayHintOptions | InlayHintRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#304 - def inlay_hint_provider; end - - # The server provides inline values. - # - # @return [boolean | InlineValueOptions | InlineValueRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#296 - def inline_value_provider; end - - # The server provides linked editing range support. - # - # @return [boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#256 - def linked_editing_range_provider; end - - # Whether server provides moniker support. - # - # @return [boolean | MonikerOptions | MonikerRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#280 - def moniker_provider; end - - # Defines how notebook documents are synced. - # - # @return [NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#76 - def notebook_document_sync; end - - # The position encoding the server picked from the encodings offered - # by the client via the client capability `general.positionEncodings`. - # - # If the client didn't provide any position encodings the only valid - # value that a server can return is 'utf-16'. - # - # If omitted it defaults to 'utf-16'. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#57 - def position_encoding; end - - # The server provides find references support. - # - # @return [boolean | ReferenceOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#140 - def references_provider; end - - # The server provides rename support. RenameOptions may only be - # specified if the client states that it supports - # `prepareSupport` in its initial `initialize` request. - # - # @return [boolean | RenameOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#224 - def rename_provider; end - - # The server provides selection range support. - # - # @return [boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#248 - def selection_range_provider; end - - # The server provides semantic tokens support. - # - # @return [SemanticTokensOptions | SemanticTokensRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#272 - def semantic_tokens_provider; end - - # The server provides signature help support. - # - # @return [SignatureHelpOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#100 - def signature_help_provider; end - - # Defines how text documents are synced. Is either a detailed structure - # defining each notification or for backwards compatibility the - # TextDocumentSyncKind number. If omitted it defaults to - # `TextDocumentSyncKind.None`. - # - # @return [TextDocumentSyncOptions | TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#68 - def text_document_sync; end - - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#342 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#346 - def to_json(*args); end - - # The server provides goto type definition support. - # - # @return [boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#124 - def type_definition_provider; end - - # The server provides type hierarchy support. - # - # @return [boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#288 - def type_hierarchy_provider; end - - # Workspace specific server capabilities - # - # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#328 - def workspace; end - - # The server provides workspace symbol support. - # - # @return [boolean | WorkspaceSymbolOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#320 - def workspace_symbol_provider; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#4 -class LanguageServer::Protocol::Interface::SetTraceParams - # @return [SetTraceParams] a new instance of SetTraceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#5 - def initialize(value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#27 - def to_json(*args); end - - # The new value that should be assigned to the trace setting. - # - # @return [TraceValue] - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#17 - def value; end -end - -# Client capabilities for the show document request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentClientCapabilities - # @return [ShowDocumentClientCapabilities] a new instance of ShowDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#8 - def initialize(support:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#25 - def attributes; end - - # The client has support for the show document - # request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#21 - def support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#31 - def to_json(*args); end -end - -# Params to show a resource. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentParams - # @return [ShowDocumentParams] a new instance of ShowDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#8 - def initialize(uri:, external: T.unsafe(nil), take_focus: T.unsafe(nil), selection: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#59 - def attributes; end - - # Indicates to show the resource in an external program. - # To show, for example, `https://code.visualstudio.com/` - # in the default WEB browser set `external` to `true`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#33 - def external; end - - # An optional selection range if the document is a text - # document. Clients might ignore the property if an - # external program is started or the file is not a text - # file. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#55 - def selection; end - - # An optional property to indicate whether the editor - # showing the document should take focus or not. - # Clients might ignore this property if an external - # program is started. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#44 - def take_focus; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#61 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#65 - def to_json(*args); end - - # The uri to show. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#23 - def uri; end -end - -# The result of an show document request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentResult - # @return [ShowDocumentResult] a new instance of ShowDocumentResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#8 - def initialize(success:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#24 - def attributes; end - - # A boolean indicating if the show was successful. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#20 - def success; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#4 -class LanguageServer::Protocol::Interface::ShowMessageParams - # @return [ShowMessageParams] a new instance of ShowMessageParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#5 - def initialize(type:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#30 - def attributes; end - - # The actual message. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#26 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#36 - def to_json(*args); end - - # The message type. See {@link MessageType}. - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#18 - def type; end -end - -# Show message request client capabilities -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::ShowMessageRequestClientCapabilities - # @return [ShowMessageRequestClientCapabilities] a new instance of ShowMessageRequestClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#8 - def initialize(message_action_item: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#24 - def attributes; end - - # Capabilities specific to the `MessageActionItem` type. - # - # @return [{ additionalPropertiesSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#20 - def message_action_item; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#4 -class LanguageServer::Protocol::Interface::ShowMessageRequestParams - # @return [ShowMessageRequestParams] a new instance of ShowMessageRequestParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#5 - def initialize(type:, message:, actions: T.unsafe(nil)); end - - # The message action items to present. - # - # @return [MessageActionItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#35 - def actions; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#39 - def attributes; end - - # The actual message - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#27 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#45 - def to_json(*args); end - - # The message type. See {@link MessageType} - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#19 - def type; end -end - -# Signature help represents the signature of something -# callable. There can be multiple signature but only one -# active and only one active parameter. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#9 -class LanguageServer::Protocol::Interface::SignatureHelp - # @return [SignatureHelp] a new instance of SignatureHelp - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#10 - def initialize(signatures:, active_signature: T.unsafe(nil), active_parameter: T.unsafe(nil)); end - - # The active parameter of the active signature. If omitted or the value - # lies outside the range of `signatures[activeSignature].parameters` - # defaults to 0 if the active signature has parameters. If - # the active signature has no parameters it is ignored. - # In future version of the protocol this property might become - # mandatory to better express the active parameter if the - # active signature does have any. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#55 - def active_parameter; end - - # The active signature. If omitted or the value lies outside the - # range of `signatures` the value defaults to zero or is ignore if - # the `SignatureHelp` as no signatures. - # - # Whenever possible implementors should make an active decision about - # the active signature and shouldn't rely on a default value. - # - # In future version of the protocol this property might become - # mandatory to better express this. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#41 - def active_signature; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#59 - def attributes; end - - # One or more signatures. If no signatures are available the signature help - # request should return `null`. - # - # @return [SignatureInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#25 - def signatures; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#61 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#65 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpClientCapabilities - # @return [SignatureHelpClientCapabilities] a new instance of SignatureHelpClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), signature_information: T.unsafe(nil), context_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#43 - def attributes; end - - # The client supports to send additional context information for a - # `textDocument/signatureHelp` request. A client that opts into - # contextSupport will also support the `retriggerCharacters` on - # `SignatureHelpOptions`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#39 - def context_support; end - - # Whether signature help supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#19 - def dynamic_registration; end - - # The client supports the following `SignatureInformation` - # specific properties. - # - # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#28 - def signature_information; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#49 - def to_json(*args); end -end - -# Additional information about the context in which a signature help request -# was triggered. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#8 -class LanguageServer::Protocol::Interface::SignatureHelpContext - # @return [SignatureHelpContext] a new instance of SignatureHelpContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#9 - def initialize(trigger_kind:, is_retrigger:, trigger_character: T.unsafe(nil), active_signature_help: T.unsafe(nil)); end - - # The currently active `SignatureHelp`. - # - # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field - # updated based on the user navigating through available signatures. - # - # @return [SignatureHelp] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#58 - def active_signature_help; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#62 - def attributes; end - - # `true` if signature help was already showing when it was triggered. - # - # Retriggers occur when the signature help is already active and can be - # caused by actions such as typing a trigger character, a cursor move, or - # document content changes. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#47 - def is_retrigger; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#64 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#68 - def to_json(*args); end - - # Character that caused signature help to be triggered. - # - # This is undefined when triggerKind !== - # SignatureHelpTriggerKind.TriggerCharacter - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#35 - def trigger_character; end - - # Action that caused signature help to be triggered. - # - # @return [SignatureHelpTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#24 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpOptions - # @return [SignatureHelpOptions] a new instance of SignatureHelpOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#41 - def attributes; end - - # List of characters that re-trigger signature help. - # - # These trigger characters are only active when signature help is already - # showing. All trigger characters are also counted as re-trigger - # characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#37 - def retrigger_characters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#43 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#47 - def to_json(*args); end - - # The characters that trigger signature help - # automatically. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#25 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpParams - # @return [SignatureHelpParams] a new instance of SignatureHelpParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), context: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#50 - def attributes; end - - # The signature help context. This is only available if the client - # specifies to send this using the client capability - # `textDocument.signatureHelp.contextSupport === true` - # - # @return [SignatureHelpContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#46 - def context; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpRegistrationOptions - # @return [SignatureHelpRegistrationOptions] a new instance of SignatureHelpRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#51 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#21 - def document_selector; end - - # List of characters that re-trigger signature help. - # - # These trigger characters are only active when signature help is already - # showing. All trigger characters are also counted as re-trigger - # characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#47 - def retrigger_characters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#57 - def to_json(*args); end - - # The characters that trigger signature help - # automatically. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#35 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#26 - def work_done_progress; end -end - -# Represents the signature of something callable. A signature -# can have a label, like a function-name, a doc-comment, and -# a set of parameters. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#9 -class LanguageServer::Protocol::Interface::SignatureInformation - # @return [SignatureInformation] a new instance of SignatureInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#10 - def initialize(label:, documentation: T.unsafe(nil), parameters: T.unsafe(nil), active_parameter: T.unsafe(nil)); end - - # The index of the active parameter. - # - # If provided, this is used in place of `SignatureHelp.activeParameter`. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#53 - def active_parameter; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#57 - def attributes; end - - # The human-readable doc-comment of this signature. Will be shown - # in the UI but can be omitted. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#35 - def documentation; end - - # The label of this signature. Will be shown in - # the UI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#26 - def label; end - - # The parameters of this signature. - # - # @return [ParameterInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#43 - def parameters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#63 - def to_json(*args); end -end - -# Static registration options to be returned in the initialize request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#7 -class LanguageServer::Protocol::Interface::StaticRegistrationOptions - # @return [StaticRegistrationOptions] a new instance of StaticRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#8 - def initialize(id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#25 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#21 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#31 - def to_json(*args); end -end - -# Represents information about programming constructs like variables, classes, -# interfaces etc. -# -# source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#8 -class LanguageServer::Protocol::Interface::SymbolInformation - # @return [SymbolInformation] a new instance of SymbolInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#9 - def initialize(name:, kind:, location:, tags: T.unsafe(nil), deprecated: T.unsafe(nil), container_name: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#81 - def attributes; end - - # The name of the symbol containing this symbol. This information is for - # user interface purposes (e.g. to render a qualifier in the user interface - # if necessary). It can't be used to re-infer a hierarchy for the document - # symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#77 - def container_name; end - - # Indicates if this symbol is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#50 - def deprecated; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#34 - def kind; end - - # The location of this symbol. The location's range is used by a tool - # to reveal the location in the editor. If the symbol is selected in the - # tool the range's start information is used to position the cursor. So - # the range usually spans more then the actual symbol's name and does - # normally include things like visibility modifiers. - # - # The range doesn't have to denote a node range in the sense of an abstract - # syntax tree. It can therefore not be used to re-construct a hierarchy of - # the symbols. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#66 - def location; end - - # The name of this symbol. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#26 - def name; end - - # Tags for this symbol. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#42 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#83 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#87 - def to_json(*args); end -end - -# Describe options to be used when registering for text document change events. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentChangeRegistrationOptions - # @return [TextDocumentChangeRegistrationOptions] a new instance of TextDocumentChangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#8 - def initialize(document_selector:, sync_kind:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#35 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#22 - def document_selector; end - - # How documents are synced to the server. See TextDocumentSyncKind.Full - # and TextDocumentSyncKind.Incremental. - # - # @return [TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#31 - def sync_kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#41 - def to_json(*args); end -end - -# Text document specific client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentClientCapabilities - # @return [TextDocumentClientCapabilities] a new instance of TextDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#8 - def initialize(synchronization: T.unsafe(nil), completion: T.unsafe(nil), hover: T.unsafe(nil), signature_help: T.unsafe(nil), declaration: T.unsafe(nil), definition: T.unsafe(nil), type_definition: T.unsafe(nil), implementation: T.unsafe(nil), references: T.unsafe(nil), document_highlight: T.unsafe(nil), document_symbol: T.unsafe(nil), code_action: T.unsafe(nil), code_lens: T.unsafe(nil), document_link: T.unsafe(nil), color_provider: T.unsafe(nil), formatting: T.unsafe(nil), range_formatting: T.unsafe(nil), on_type_formatting: T.unsafe(nil), rename: T.unsafe(nil), publish_diagnostics: T.unsafe(nil), folding_range: T.unsafe(nil), selection_range: T.unsafe(nil), linked_editing_range: T.unsafe(nil), call_hierarchy: T.unsafe(nil), semantic_tokens: T.unsafe(nil), moniker: T.unsafe(nil), type_hierarchy: T.unsafe(nil), inline_value: T.unsafe(nil), inlay_hint: T.unsafe(nil), diagnostic: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#285 - def attributes; end - - # Capabilities specific to the various call hierarchy requests. - # - # @return [CallHierarchyClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#233 - def call_hierarchy; end - - # Capabilities specific to the `textDocument/codeAction` request. - # - # @return [CodeActionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#134 - def code_action; end - - # Capabilities specific to the `textDocument/codeLens` request. - # - # @return [CodeLensClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#142 - def code_lens; end - - # Capabilities specific to the `textDocument/documentColor` and the - # `textDocument/colorPresentation` request. - # - # @return [DocumentColorClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#159 - def color_provider; end - - # Capabilities specific to the `textDocument/completion` request. - # - # @return [CompletionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#54 - def completion; end - - # Capabilities specific to the `textDocument/declaration` request. - # - # @return [DeclarationClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#78 - def declaration; end - - # Capabilities specific to the `textDocument/definition` request. - # - # @return [DefinitionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#86 - def definition; end - - # Capabilities specific to the diagnostic pull model. - # - # @return [DiagnosticClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#281 - def diagnostic; end - - # Capabilities specific to the `textDocument/documentHighlight` request. - # - # @return [DocumentHighlightClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#118 - def document_highlight; end - - # Capabilities specific to the `textDocument/documentLink` request. - # - # @return [DocumentLinkClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#150 - def document_link; end - - # Capabilities specific to the `textDocument/documentSymbol` request. - # - # @return [DocumentSymbolClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#126 - def document_symbol; end - - # Capabilities specific to the `textDocument/foldingRange` request. - # - # @return [FoldingRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#209 - def folding_range; end - - # Capabilities specific to the `textDocument/formatting` request. - # - # @return [DocumentFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#167 - def formatting; end - - # Capabilities specific to the `textDocument/hover` request. - # - # @return [HoverClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#62 - def hover; end - - # Capabilities specific to the `textDocument/implementation` request. - # - # @return [ImplementationClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#102 - def implementation; end - - # Capabilities specific to the `textDocument/inlayHint` request. - # - # @return [InlayHintClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#273 - def inlay_hint; end - - # Capabilities specific to the `textDocument/inlineValue` request. - # - # @return [InlineValueClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#265 - def inline_value; end - - # Capabilities specific to the `textDocument/linkedEditingRange` request. - # - # @return [LinkedEditingRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#225 - def linked_editing_range; end - - # Capabilities specific to the `textDocument/moniker` request. - # - # @return [MonikerClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#249 - def moniker; end - - # request. - # Capabilities specific to the `textDocument/onTypeFormatting` request. - # - # @return [DocumentOnTypeFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#184 - def on_type_formatting; end - - # Capabilities specific to the `textDocument/publishDiagnostics` - # notification. - # - # @return [PublishDiagnosticsClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#201 - def publish_diagnostics; end - - # Capabilities specific to the `textDocument/rangeFormatting` request. - # - # @return [DocumentRangeFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#175 - def range_formatting; end - - # Capabilities specific to the `textDocument/references` request. - # - # @return [ReferenceClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#110 - def references; end - - # Capabilities specific to the `textDocument/rename` request. - # - # @return [RenameClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#192 - def rename; end - - # Capabilities specific to the `textDocument/selectionRange` request. - # - # @return [SelectionRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#217 - def selection_range; end - - # Capabilities specific to the various semantic token requests. - # - # @return [SemanticTokensClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#241 - def semantic_tokens; end - - # Capabilities specific to the `textDocument/signatureHelp` request. - # - # @return [SignatureHelpClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#70 - def signature_help; end - - # @return [TextDocumentSyncClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#46 - def synchronization; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#287 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#291 - def to_json(*args); end - - # Capabilities specific to the `textDocument/typeDefinition` request. - # - # @return [TypeDefinitionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#94 - def type_definition; end - - # Capabilities specific to the various type hierarchy requests. - # - # @return [TypeHierarchyClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#257 - def type_hierarchy; end -end - -# An event describing a change to a text document. If only a text is provided -# it is considered to be the full content of the document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#8 -class LanguageServer::Protocol::Interface::TextDocumentContentChangeEvent - # @return [TextDocumentContentChangeEvent] a new instance of TextDocumentContentChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#9 - def initialize(text:, range: T.unsafe(nil), range_length: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#47 - def attributes; end - - # The range of the document that changed. - # - # @return [Range, nil] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#23 - def range; end - - # The optional length of the range that got replaced. - # - # @return [number, nil] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#31 - def range_length; end - - # The new text for the provided range. - # - # --- OR --- - # - # The new text of the whole document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#43 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#49 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#53 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentEdit - # @return [TextDocumentEdit] a new instance of TextDocumentEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#5 - def initialize(text_document:, edits:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#30 - def attributes; end - - # The edits to be applied. - # - # @return [(TextEdit | AnnotatedTextEdit)[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#26 - def edits; end - - # The text document to change. - # - # @return [OptionalVersionedTextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentIdentifier - # @return [TextDocumentIdentifier] a new instance of TextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#5 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#27 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#17 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentItem - # @return [TextDocumentItem] a new instance of TextDocumentItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#5 - def initialize(uri:, language_id:, version:, text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#49 - def attributes; end - - # The text document's language identifier. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#28 - def language_id; end - - # The content of the opened text document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#45 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#55 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#20 - def uri; end - - # The version number of this document (it will increase after each - # change, including undo/redo). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#37 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentPositionParams - # @return [TextDocumentPositionParams] a new instance of TextDocumentPositionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#5 - def initialize(text_document:, position:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#30 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#26 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#36 - def to_json(*args); end -end - -# General text document registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentRegistrationOptions - # @return [TextDocumentRegistrationOptions] a new instance of TextDocumentRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#8 - def initialize(document_selector:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#25 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#21 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSaveRegistrationOptions - # @return [TextDocumentSaveRegistrationOptions] a new instance of TextDocumentSaveRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#5 - def initialize(document_selector:, include_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#31 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#19 - def document_selector; end - - # The client is supposed to include the content on save. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#27 - def include_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities - # @return [TextDocumentSyncClientCapabilities] a new instance of TextDocumentSyncClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), did_save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#50 - def attributes; end - - # The client supports did save notifications. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#46 - def did_save; end - - # Whether text document synchronization supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#56 - def to_json(*args); end - - # The client supports sending will save notifications. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#28 - def will_save; end - - # The client supports sending a will save request and - # waits for a response providing text edits which will - # be applied to the document before it is saved. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#38 - def will_save_wait_until; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSyncOptions - # @return [TextDocumentSyncOptions] a new instance of TextDocumentSyncOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#5 - def initialize(open_close: T.unsafe(nil), change: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#66 - def attributes; end - - # Change notifications are sent to the server. See - # TextDocumentSyncKind.None, TextDocumentSyncKind.Full and - # TextDocumentSyncKind.Incremental. If omitted it defaults to - # TextDocumentSyncKind.None. - # - # @return [TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#35 - def change; end - - # Open and close notifications are sent to the server. If omitted open - # close notifications should not be sent. - # Open and close notifications are sent to the server. If omitted open - # close notification should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#24 - def open_close; end - - # If present save notifications are sent to the server. If omitted the - # notification should not be sent. - # - # @return [boolean | SaveOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#62 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#72 - def to_json(*args); end - - # If present will save notifications are sent to the server. If omitted - # the notification should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#44 - def will_save; end - - # If present will save wait until requests are sent to the server. If - # omitted the request should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#53 - def will_save_wait_until; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#4 -class LanguageServer::Protocol::Interface::TextEdit - # @return [TextEdit] a new instance of TextEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#5 - def initialize(range:, new_text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#32 - def attributes; end - - # The string to be inserted. For delete operations use an - # empty string. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#28 - def new_text; end - - # The range of the text document to be manipulated. To insert - # text into a document create a range where start === end. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#19 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionClientCapabilities - # @return [TypeDefinitionClientCapabilities] a new instance of TypeDefinitionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#32 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `TypeDefinitionRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionOptions - # @return [TypeDefinitionOptions] a new instance of TypeDefinitionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionParams - # @return [TypeDefinitionParams] a new instance of TypeDefinitionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionRegistrationOptions - # @return [TypeDefinitionRegistrationOptions] a new instance of TypeDefinitionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyItem - # @return [TypeHierarchyItem] a new instance of TypeHierarchyItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#5 - def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#90 - def attributes; end - - # A data entry field that is preserved between a type hierarchy prepare and - # supertypes or subtypes requests. It could also be used to identify the - # type hierarchy in the server, helping improve the performance on - # resolving supertypes and subtypes. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#86 - def data; end - - # More detail for this item, e.g. the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#48 - def detail; end - - # The kind of this item. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#32 - def kind; end - - # The name of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#24 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else, e.g. comments and code. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#65 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the - # [`range`](#TypeHierarchyItem.range). - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#75 - def selection_range; end - - # Tags for this item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#40 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#92 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#96 - def to_json(*args); end - - # The resource identifier of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#56 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyOptions - # @return [TypeHierarchyOptions] a new instance of TypeHierarchyOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyPrepareParams - # @return [TypeHierarchyPrepareParams] a new instance of TypeHierarchyPrepareParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyRegistrationOptions - # @return [TypeHierarchyRegistrationOptions] a new instance of TypeHierarchyRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams - # @return [TypeHierarchySubtypesParams] a new instance of TypeHierarchySubtypesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#37 - def attributes; end - - # @return [TypeHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchySupertypesParams - # @return [TypeHierarchySupertypesParams] a new instance of TypeHierarchySupertypesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#37 - def attributes; end - - # @return [TypeHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#19 - def work_done_token; end -end - -# A diagnostic report indicating that the last returned -# report is still accurate. -# -# source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#8 -class LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport - # @return [UnchangedDocumentDiagnosticReport] a new instance of UnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#9 - def initialize(kind:, result_id:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#38 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#25 - def kind; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#44 - def to_json(*args); end -end - -# General parameters to unregister a capability. -# -# source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#7 -class LanguageServer::Protocol::Interface::Unregistration - # @return [Unregistration] a new instance of Unregistration - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#8 - def initialize(id:, method:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#34 - def attributes; end - - # The id used to unregister the request or notification. Usually an id - # provided during the register request. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#22 - def id; end - - # The method / capability to unregister for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#30 - def method; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#4 -class LanguageServer::Protocol::Interface::UnregistrationParams - # @return [UnregistrationParams] a new instance of UnregistrationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#5 - def initialize(unregisterations:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#24 - def to_json(*args); end - - # @return [Unregistration[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#14 - def unregisterations; end -end - -# A versioned notebook document identifier. -# -# source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#7 -class LanguageServer::Protocol::Interface::VersionedNotebookDocumentIdentifier - # @return [VersionedNotebookDocumentIdentifier] a new instance of VersionedNotebookDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#8 - def initialize(version:, uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#39 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#29 - def uri; end - - # The version number of this notebook document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#21 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::VersionedTextDocumentIdentifier - # @return [VersionedTextDocumentIdentifier] a new instance of VersionedTextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#5 - def initialize(uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#39 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#18 - def uri; end - - # The version number of this document. - # - # The version number of a document will increase after each change, - # including undo/redo. The number doesn't need to be consecutive. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#29 - def version; end -end - -# The parameters send in a will save text document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#7 -class LanguageServer::Protocol::Interface::WillSaveTextDocumentParams - # @return [WillSaveTextDocumentParams] a new instance of WillSaveTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#8 - def initialize(text_document:, reason:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#33 - def attributes; end - - # The 'TextDocumentSaveReason'. - # - # @return [TextDocumentSaveReason] - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#29 - def reason; end - - # The document that will be saved. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressBegin - # @return [WorkDoneProgressBegin] a new instance of WorkDoneProgressBegin - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#5 - def initialize(kind:, title:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#68 - def attributes; end - - # Controls if a cancel button should show to allow the user to cancel the - # long running operation. Clients that don't support cancellation are - # allowed to ignore the setting. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#39 - def cancellable; end - - # @return ["begin"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#18 - def kind; end - - # Optional, more detailed associated progress message. Contains - # complementary information to the `title`. - # - # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". - # If unset, the previous progress message (if any) is still valid. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#51 - def message; end - - # Optional progress percentage to display (value 100 is considered 100%). - # If not provided infinite progress is assumed and clients are allowed - # to ignore the `percentage` value in subsequent in report notifications. - # - # The value should be steadily rising. Clients are free to ignore values - # that are not following this rule. The value range is [0, 100] - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#64 - def percentage; end - - # Mandatory title of the progress operation. Used to briefly inform about - # the kind of operation being performed. - # - # Examples: "Indexing" or "Linking dependencies". - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#29 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#70 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#74 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressCancelParams - # @return [WorkDoneProgressCancelParams] a new instance of WorkDoneProgressCancelParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#5 - def initialize(token:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#27 - def to_json(*args); end - - # The token to be used to report progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#17 - def token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressCreateParams - # @return [WorkDoneProgressCreateParams] a new instance of WorkDoneProgressCreateParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#5 - def initialize(token:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#27 - def to_json(*args); end - - # The token to be used to report progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#17 - def token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressEnd - # @return [WorkDoneProgressEnd] a new instance of WorkDoneProgressEnd - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#5 - def initialize(kind:, message: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#28 - def attributes; end - - # @return ["end"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#15 - def kind; end - - # Optional, a final message indicating to for example indicate the outcome - # of the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#24 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#34 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressOptions - # @return [WorkDoneProgressOptions] a new instance of WorkDoneProgressOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressParams - # @return [WorkDoneProgressParams] a new instance of WorkDoneProgressParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#5 - def initialize(work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#27 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#17 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressReport - # @return [WorkDoneProgressReport] a new instance of WorkDoneProgressReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#5 - def initialize(kind:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#58 - def attributes; end - - # Controls enablement state of a cancel button. This property is only valid - # if a cancel button got requested in the `WorkDoneProgressBegin` payload. - # - # Clients that don't support cancellation or don't support control the - # button's enablement state are allowed to ignore the setting. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#29 - def cancellable; end - - # @return ["report"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#17 - def kind; end - - # Optional, more detailed associated progress message. Contains - # complementary information to the `title`. - # - # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". - # If unset, the previous progress message (if any) is still valid. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#41 - def message; end - - # Optional progress percentage to display (value 100 is considered 100%). - # If not provided infinite progress is assumed and clients are allowed - # to ignore the `percentage` value in subsequent in report notifications. - # - # The value should be steadily rising. Clients are free to ignore values - # that are not following this rule. The value range is [0, 100] - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#54 - def percentage; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#64 - def to_json(*args); end -end - -# Parameters of the workspace diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams - # @return [WorkspaceDiagnosticParams] a new instance of WorkspaceDiagnosticParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#8 - def initialize(previous_result_ids:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#53 - def attributes; end - - # The additional identifier provided during registration. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#40 - def identifier; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#32 - def partial_result_token; end - - # The currently known diagnostic reports with their - # previous result ids. - # - # @return [PreviousResultId[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#49 - def previous_result_ids; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#55 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#59 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#23 - def work_done_token; end -end - -# A workspace diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReport - # @return [WorkspaceDiagnosticReport] a new instance of WorkspaceDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#8 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#21 - def attributes; end - - # @return [WorkspaceDocumentDiagnosticReport[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#17 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#27 - def to_json(*args); end -end - -# A partial result for a workspace diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReportPartialResult - # @return [WorkspaceDiagnosticReportPartialResult] a new instance of WorkspaceDiagnosticReportPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#8 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#21 - def attributes; end - - # @return [WorkspaceDocumentDiagnosticReport[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#17 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceEdit - # @return [WorkspaceEdit] a new instance of WorkspaceEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#5 - def initialize(changes: T.unsafe(nil), document_changes: T.unsafe(nil), change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#56 - def attributes; end - - # A map of change annotations that can be referenced in - # `AnnotatedTextEdit`s or create, rename and delete file / folder - # operations. - # - # Whether clients honor this property depends on the client capability - # `workspace.changeAnnotationSupport`. - # - # @return [{ [id: string]: ChangeAnnotation; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#52 - def change_annotations; end - - # Holds changes to existing resources. - # - # @return [{}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#19 - def changes; end - - # Depending on the client capability - # `workspace.workspaceEdit.resourceOperations` document changes are either - # an array of `TextDocumentEdit`s to express changes to n different text - # documents where each text document edit addresses a specific version of - # a text document. Or it can contain above `TextDocumentEdit`s mixed with - # create, rename and delete file / folder operations. - # - # Whether a client supports versioned document edits is expressed via - # `workspace.workspaceEdit.documentChanges` client capability. - # - # If a client neither supports `documentChanges` nor - # `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s - # using the `changes` property are supported. - # - # @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#39 - def document_changes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#62 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities - # @return [WorkspaceEditClientCapabilities] a new instance of WorkspaceEditClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#5 - def initialize(document_changes: T.unsafe(nil), resource_operations: T.unsafe(nil), failure_handling: T.unsafe(nil), normalizes_line_endings: T.unsafe(nil), change_annotation_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#63 - def attributes; end - - # Whether the client in general supports change annotations on text edits, - # create file, rename file and delete file changes. - # - # @return [{ groupsOnLabel?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#59 - def change_annotation_support; end - - # The client supports versioned document changes in `WorkspaceEdit`s - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#21 - def document_changes; end - - # The failure handling strategy of a client if applying the workspace edit - # fails. - # - # @return [FailureHandlingKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#39 - def failure_handling; end - - # Whether the client normalizes line endings to the client specific - # setting. - # If set to `true` the client will normalize line ending characters - # in a workspace edit to the client specific new line character(s). - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#50 - def normalizes_line_endings; end - - # The resource operations the client supports. Clients should at least - # support 'create', 'rename' and 'delete' files and folders. - # - # @return [ResourceOperationKind[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#30 - def resource_operations; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#65 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#69 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceFolder - # @return [WorkspaceFolder] a new instance of WorkspaceFolder - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#5 - def initialize(uri:, name:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#31 - def attributes; end - - # The name of the workspace folder. Used to refer to this - # workspace folder in the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#27 - def name; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#37 - def to_json(*args); end - - # The associated URI for this workspace folder. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#18 - def uri; end -end - -# The workspace folder change event. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceFoldersChangeEvent - # @return [WorkspaceFoldersChangeEvent] a new instance of WorkspaceFoldersChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#8 - def initialize(added:, removed:); end - - # The array of added workspace folders - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#21 - def added; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#33 - def attributes; end - - # The array of the removed workspace folders - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#29 - def removed; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities - # @return [WorkspaceFoldersServerCapabilities] a new instance of WorkspaceFoldersServerCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#5 - def initialize(supported: T.unsafe(nil), change_notifications: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#36 - def attributes; end - - # Whether the server wants to receive workspace folder - # change notifications. - # - # If a string is provided, the string is treated as an ID - # under which the notification is registered on the client - # side. The ID can be used to unregister for these events - # using the `client/unregisterCapability` request. - # - # @return [string | boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#32 - def change_notifications; end - - # The server has support for workspace folders - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#18 - def supported; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#42 - def to_json(*args); end -end - -# A full document diagnostic report for a workspace diagnostic result. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport - # @return [WorkspaceFullDocumentDiagnosticReport] a new instance of WorkspaceFullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, uri:, version:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#63 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#42 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#24 - def kind; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#65 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#69 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#50 - def uri; end - - # The version number for which the diagnostics are reported. - # If the document is not marked as open `null` can be provided. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#59 - def version; end -end - -# A special workspace symbol that supports locations without a range -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceSymbol - # @return [WorkspaceSymbol] a new instance of WorkspaceSymbol - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#8 - def initialize(name:, kind:, location:, tags: T.unsafe(nil), container_name: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#77 - def attributes; end - - # The name of the symbol containing this symbol. This information is for - # user interface purposes (e.g. to render a qualifier in the user interface - # if necessary). It can't be used to re-infer a hierarchy for the document - # symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#52 - def container_name; end - - # A data entry field that is preserved on a workspace symbol between a - # workspace symbol request and a workspace symbol resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#73 - def data; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#33 - def kind; end - - # The location of this symbol. Whether a server is allowed to - # return a location without a range depends on the client - # capability `workspace.symbol.resolveSupport`. - # - # See also `SymbolInformation.location`. - # - # @return [Location | { uri: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#64 - def location; end - - # The name of this symbol. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#25 - def name; end - - # Tags for this completion item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#41 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#79 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#83 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolClientCapabilities - # @return [WorkspaceSymbolClientCapabilities] a new instance of WorkspaceSymbolClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), tag_support: T.unsafe(nil), resolve_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#52 - def attributes; end - - # Symbol request supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#20 - def dynamic_registration; end - - # The client support partial workspace symbols. The client will send the - # request `workspaceSymbol/resolve` to the server to resolve additional - # properties. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#48 - def resolve_support; end - - # Specific capabilities for the `SymbolKind` in the `workspace/symbol` - # request. - # - # @return [{ valueSet?: SymbolKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#29 - def symbol_kind; end - - # The client supports tags on `SymbolInformation` and `WorkspaceSymbol`. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: 1[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#38 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#58 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolOptions - # @return [WorkspaceSymbolOptions] a new instance of WorkspaceSymbolOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#28 - def attributes; end - - # The server provides support to resolve additional - # information for a workspace symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#24 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#15 - def work_done_progress; end -end - -# The parameters of a Workspace Symbol Request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceSymbolParams - # @return [WorkspaceSymbolParams] a new instance of WorkspaceSymbolParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#8 - def initialize(query:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#44 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#31 - def partial_result_token; end - - # A query string to filter symbols by. Clients may send an empty - # string here to request all symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#40 - def query; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#50 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#22 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolRegistrationOptions - # @return [WorkspaceSymbolRegistrationOptions] a new instance of WorkspaceSymbolRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#28 - def attributes; end - - # The server provides support to resolve additional - # information for a workspace symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#24 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#15 - def work_done_progress; end -end - -# An unchanged document diagnostic report for a workspace diagnostic result. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport - # @return [WorkspaceUnchangedDocumentDiagnosticReport] a new instance of WorkspaceUnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#8 - def initialize(kind:, result_id:, uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#56 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#26 - def kind; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#35 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#62 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#43 - def uri; end - - # The version number for which the diagnostics are reported. - # If the document is not marked as open `null` can be provided. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#52 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#7 -module LanguageServer::Protocol::Transport; end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#8 -module LanguageServer::Protocol::Transport::Io; end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#9 -class LanguageServer::Protocol::Transport::Io::Reader - # @return [Reader] a new instance of Reader - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#10 - def initialize(io); end - - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#15 - def read(&block); end - - private - - # Returns the value of attribute io. - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#26 - def io; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#5 -class LanguageServer::Protocol::Transport::Io::Writer - # @return [Writer] a new instance of Writer - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#8 - def initialize(io); end - - # Returns the value of attribute io. - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#6 - def io; end - - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#13 - def write(response); end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#4 -module LanguageServer::Protocol::Transport::Stdio; end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#5 -class LanguageServer::Protocol::Transport::Stdio::Reader < ::LanguageServer::Protocol::Transport::Io::Reader - # @return [Reader] a new instance of Reader - # - # source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#6 - def initialize; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#5 -class LanguageServer::Protocol::Transport::Stdio::Writer < ::LanguageServer::Protocol::Transport::Io::Writer - # @return [Writer] a new instance of Writer - # - # source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#6 - def initialize; end -end - -# source://language_server-protocol//lib/language_server/protocol/version.rb#3 -LanguageServer::Protocol::VERSION = T.let(T.unsafe(nil), String) diff --git a/spec/money/distributed/storage_spec.rb b/spec/money/distributed/storage_spec.rb index 299b808..ec00382 100644 --- a/spec/money/distributed/storage_spec.rb +++ b/spec/money/distributed/storage_spec.rb @@ -35,4 +35,45 @@ Timecop.freeze(Time.now + ttl + 1) expect(subject.get_rate('USD', 'RUB')).to eq 70.456 end + + context 'when multiple threads' do + let(:storage) { subject } + let(:rates) do + { + 'USD_TO_EUR' => '0.85', + 'EUR_TO_USD' => '1.18', + } + end + + before do + rates.each do |key, rate| + redis.hset(described_class::REDIS_KEY, key, rate) + end + end + + # rubocop:disable RSpec/ExampleLength + it 'maintains cache consistency with concurrent reads and writes' do + storage.clear_cache + + threads = [] + 10.times do + threads << Thread.new do + 1000.times do + key, rate = rates.to_a.sample + iso_from, iso_to = key.split(described_class::INDEX_KEY_SEPARATOR) + storage.add_rate(iso_from, iso_to, rate) + expect(storage.get_rate(iso_from, iso_to)).to eq(BigDecimal(rate)) + end + end + end + + threads.each(&:join) + + rates.each do |key, rate| + expect(storage.get_rate(*key.split(described_class::INDEX_KEY_SEPARATOR))) + .to eq(BigDecimal(rate)) + end + end + # rubocop:enable RSpec/ExampleLength + end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c8d4c5f..3280d78 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,8 +2,9 @@ # frozen_string_literal: true require 'rspec' -require 'timecop' +require 'concurrent-ruby' require 'money_distributed' +require 'timecop' RSpec.configure do |c| c.order = :random