Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CompletedFuture.php

class CompletedFuture

@template T @template-implements FutureInterface<T>

Hierarchy

  • class \OpenTelemetry\SDK\Common\Future\CompletedFuture implements \OpenTelemetry\SDK\Common\Future\FutureInterface

Expanded class hierarchy of CompletedFuture

6 files declare their use of CompletedFuture
ConsoleExporter.php in vendor/open-telemetry/sdk/Logs/Exporter/ConsoleExporter.php
InMemoryExporter.php in vendor/open-telemetry/sdk/Logs/Exporter/InMemoryExporter.php
NoopExporter.php in vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php
PsrTransport.php in vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php
SpanExporterTrait.php in vendor/open-telemetry/sdk/Trace/Behavior/SpanExporterTrait.php

... See full list

File

vendor/open-telemetry/sdk/Common/Future/CompletedFuture.php, line 14

Namespace

OpenTelemetry\SDK\Common\Future
View source
final class CompletedFuture implements FutureInterface {
    
    /**
     * @param T $value
     */
    public function __construct($value) {
    }
    public function await() {
        return $this->value;
    }
    public function map(Closure $closure) : FutureInterface {
        $c = $closure;
        unset($closure);
        try {
            return new CompletedFuture($c($this->value));
        } catch (Throwable $e) {
            return new ErrorFuture($e);
        }
    }
    public function catch(Closure $closure) : FutureInterface {
        return $this;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
CompletedFuture::await public function @psalm-return T Overrides FutureInterface::await
CompletedFuture::catch public function @psalm-template U
@psalm-param Closure(\Throwable): U $closure
@psalm-return FutureInterface&lt;T|U&gt;
Overrides FutureInterface::catch
CompletedFuture::map public function @psalm-template U
@psalm-param Closure(T): U $closure
@psalm-return FutureInterface&lt;U&gt;
Overrides FutureInterface::map
CompletedFuture::__construct public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal