///
/// FastIO-Swift-Cxx-Bridge.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2024 Marc Rousavy @ Margelo
///

#pragma once

// Forward declarations of C++ defined types
// Forward declaration of `ArrayBufferHolder` to properly resolve imports.
namespace NitroModules { class ArrayBufferHolder; }
// Forward declaration of `ArrayBuffer` to properly resolve imports.
namespace NitroModules { class ArrayBuffer; }
// Forward declaration of `HybridDuplexStreamSpec` to properly resolve imports.
namespace margelo::nitro::fastio { class HybridDuplexStreamSpec; }
// Forward declaration of `HybridFileSystemSpec` to properly resolve imports.
namespace margelo::nitro::fastio { class HybridFileSystemSpec; }
// Forward declaration of `HybridInputStreamSpec` to properly resolve imports.
namespace margelo::nitro::fastio { class HybridInputStreamSpec; }
// Forward declaration of `HybridNetworkSpec` to properly resolve imports.
namespace margelo::nitro::fastio { class HybridNetworkSpec; }
// Forward declaration of `HybridOutputStreamSpec` to properly resolve imports.
namespace margelo::nitro::fastio { class HybridOutputStreamSpec; }
// Forward declaration of `HybridStreamFactorySpec` to properly resolve imports.
namespace margelo::nitro::fastio { class HybridStreamFactorySpec; }
// Forward declaration of `HybridWebSocketManagerSpec` to properly resolve imports.
namespace margelo::nitro::fastio { class HybridWebSocketManagerSpec; }
// Forward declaration of `HybridWebSocketSpec` to properly resolve imports.
namespace margelo::nitro::fastio { class HybridWebSocketSpec; }
// Forward declaration of `Metadata` to properly resolve imports.
namespace margelo::nitro::fastio { struct Metadata; }
// Forward declaration of `NativeFilePickerOptions` to properly resolve imports.
namespace margelo::nitro::fastio { struct NativeFilePickerOptions; }

// Forward declarations of Swift defined types
// Forward declaration of `HybridDuplexStreamSpec_cxx` to properly resolve imports.
namespace FastIO { class HybridDuplexStreamSpec_cxx; }
// Forward declaration of `HybridFileSystemSpec_cxx` to properly resolve imports.
namespace FastIO { class HybridFileSystemSpec_cxx; }
// Forward declaration of `HybridInputStreamSpec_cxx` to properly resolve imports.
namespace FastIO { class HybridInputStreamSpec_cxx; }
// Forward declaration of `HybridNetworkSpec_cxx` to properly resolve imports.
namespace FastIO { class HybridNetworkSpec_cxx; }
// Forward declaration of `HybridOutputStreamSpec_cxx` to properly resolve imports.
namespace FastIO { class HybridOutputStreamSpec_cxx; }
// Forward declaration of `HybridStreamFactorySpec_cxx` to properly resolve imports.
namespace FastIO { class HybridStreamFactorySpec_cxx; }
// Forward declaration of `HybridWebSocketManagerSpec_cxx` to properly resolve imports.
namespace FastIO { class HybridWebSocketManagerSpec_cxx; }
// Forward declaration of `HybridWebSocketSpec_cxx` to properly resolve imports.
namespace FastIO { class HybridWebSocketSpec_cxx; }

// Include C++ defined types
#include "HybridDuplexStreamSpec.hpp"
#include "HybridFileSystemSpec.hpp"
#include "HybridInputStreamSpec.hpp"
#include "HybridNetworkSpec.hpp"
#include "HybridOutputStreamSpec.hpp"
#include "HybridStreamFactorySpec.hpp"
#include "HybridWebSocketManagerSpec.hpp"
#include "HybridWebSocketSpec.hpp"
#include "Metadata.hpp"
#include "NativeFilePickerOptions.hpp"
#include <NitroModules/ArrayBuffer.hpp>
#include <NitroModules/ArrayBufferHolder.hpp>
#include <NitroModules/Promise.hpp>
#include <NitroModules/PromiseHolder.hpp>
#include <NitroModules/Result.hpp>
#include <exception>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <vector>

/**
 * Contains specialized versions of C++ templated types so they can be accessed from Swift,
 * as well as helper functions to interact with those C++ types from Swift.
 */
namespace margelo::nitro::fastio::bridge::swift {

  // pragma MARK: std::vector<std::string>
  /**
   * Specialized version of `std::vector<std::string>`.
   */
  using std__vector_std__string_ = std::vector<std::string>;
  inline std::vector<std::string> create_std__vector_std__string_(size_t size) {
    std::vector<std::string> vector;
    vector.reserve(size);
    return vector;
  }
  
  // pragma MARK: std::shared_ptr<Promise<std::vector<std::string>>>
  /**
   * Specialized version of `std::shared_ptr<Promise<std::vector<std::string>>>`.
   */
  using std__shared_ptr_Promise_std__vector_std__string___ = std::shared_ptr<Promise<std::vector<std::string>>>;
  inline std::shared_ptr<Promise<std::vector<std::string>>> create_std__shared_ptr_Promise_std__vector_std__string___() {
    return Promise<std::vector<std::string>>::create();
  }
  inline PromiseHolder<std::vector<std::string>> wrap_std__shared_ptr_Promise_std__vector_std__string___(std::shared_ptr<Promise<std::vector<std::string>>> promise) {
    return PromiseHolder<std::vector<std::string>>(std::move(promise));
  }
  
  // pragma MARK: std::function<void(const std::vector<std::string>& /* result */)>
  /**
   * Specialized version of `std::function<void(const std::vector<std::string>&)>`.
   */
  using Func_void_std__vector_std__string_ = std::function<void(const std::vector<std::string>& /* result */)>;
  /**
   * Wrapper class for a `std::function<void(const std::vector<std::string>& / * result * /)>`, this can be used from Swift.
   */
  class Func_void_std__vector_std__string__Wrapper final {
  public:
    explicit Func_void_std__vector_std__string__Wrapper(std::function<void(const std::vector<std::string>& /* result */)>&& func): _function(std::make_shared<std::function<void(const std::vector<std::string>& /* result */)>>(std::move(func))) {}
    inline void call(std::vector<std::string> result) const {
      _function->operator()(result);
    }
  private:
    std::shared_ptr<std::function<void(const std::vector<std::string>& /* result */)>> _function;
  };
  Func_void_std__vector_std__string_ create_Func_void_std__vector_std__string_(void* _Nonnull swiftClosureWrapper);
  inline Func_void_std__vector_std__string__Wrapper wrap_Func_void_std__vector_std__string_(Func_void_std__vector_std__string_ value) {
    return Func_void_std__vector_std__string__Wrapper(std::move(value));
  }
  
  // pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
  /**
   * Specialized version of `std::function<void(const std::exception_ptr&)>`.
   */
  using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
  /**
   * Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
   */
  class Func_void_std__exception_ptr_Wrapper final {
  public:
    explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_shared<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
    inline void call(std::exception_ptr error) const {
      _function->operator()(error);
    }
  private:
    std::shared_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
  };
  Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* _Nonnull swiftClosureWrapper);
  inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) {
    return Func_void_std__exception_ptr_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::optional<bool>
  /**
   * Specialized version of `std::optional<bool>`.
   */
  using std__optional_bool_ = std::optional<bool>;
  inline std::optional<bool> create_std__optional_bool_(const bool& value) {
    return std::optional<bool>(value);
  }
  
  // pragma MARK: std::optional<std::string>
  /**
   * Specialized version of `std::optional<std::string>`.
   */
  using std__optional_std__string_ = std::optional<std::string>;
  inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) {
    return std::optional<std::string>(value);
  }
  
  // pragma MARK: std::optional<std::vector<std::string>>
  /**
   * Specialized version of `std::optional<std::vector<std::string>>`.
   */
  using std__optional_std__vector_std__string__ = std::optional<std::vector<std::string>>;
  inline std::optional<std::vector<std::string>> create_std__optional_std__vector_std__string__(const std::vector<std::string>& value) {
    return std::optional<std::vector<std::string>>(value);
  }
  
  // pragma MARK: std::optional<NativeFilePickerOptions>
  /**
   * Specialized version of `std::optional<NativeFilePickerOptions>`.
   */
  using std__optional_NativeFilePickerOptions_ = std::optional<NativeFilePickerOptions>;
  inline std::optional<NativeFilePickerOptions> create_std__optional_NativeFilePickerOptions_(const NativeFilePickerOptions& value) {
    return std::optional<NativeFilePickerOptions>(value);
  }
  
  // pragma MARK: std::shared_ptr<margelo::nitro::fastio::HybridFileSystemSpec>
  /**
   * Specialized version of `std::shared_ptr<margelo::nitro::fastio::HybridFileSystemSpec>`.
   */
  using std__shared_ptr_margelo__nitro__fastio__HybridFileSystemSpec_ = std::shared_ptr<margelo::nitro::fastio::HybridFileSystemSpec>;
  std::shared_ptr<margelo::nitro::fastio::HybridFileSystemSpec> create_std__shared_ptr_margelo__nitro__fastio__HybridFileSystemSpec_(void* _Nonnull swiftUnsafePointer);
  void* _Nonnull get_std__shared_ptr_margelo__nitro__fastio__HybridFileSystemSpec_(std__shared_ptr_margelo__nitro__fastio__HybridFileSystemSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<margelo::nitro::fastio::HybridFileSystemSpec>
  using std__weak_ptr_margelo__nitro__fastio__HybridFileSystemSpec_ = std::weak_ptr<margelo::nitro::fastio::HybridFileSystemSpec>;
  inline std__weak_ptr_margelo__nitro__fastio__HybridFileSystemSpec_ weakify_std__shared_ptr_margelo__nitro__fastio__HybridFileSystemSpec_(const std::shared_ptr<margelo::nitro::fastio::HybridFileSystemSpec>& strong) { return strong; }
  
  // pragma MARK: Result<Metadata>
  using Result_Metadata_ = Result<Metadata>;
  inline Result_Metadata_ create_Result_Metadata_(const Metadata& value) {
    return Result<Metadata>::withValue(value);
  }
  inline Result_Metadata_ create_Result_Metadata_(const std::exception_ptr& error) {
    return Result<Metadata>::withError(error);
  }
  
  // pragma MARK: Result<std::string>
  using Result_std__string_ = Result<std::string>;
  inline Result_std__string_ create_Result_std__string_(const std::string& value) {
    return Result<std::string>::withValue(value);
  }
  inline Result_std__string_ create_Result_std__string_(const std::exception_ptr& error) {
    return Result<std::string>::withError(error);
  }
  
  // pragma MARK: Result<std::shared_ptr<Promise<std::vector<std::string>>>>
  using Result_std__shared_ptr_Promise_std__vector_std__string____ = Result<std::shared_ptr<Promise<std::vector<std::string>>>>;
  inline Result_std__shared_ptr_Promise_std__vector_std__string____ create_Result_std__shared_ptr_Promise_std__vector_std__string____(const std::shared_ptr<Promise<std::vector<std::string>>>& value) {
    return Result<std::shared_ptr<Promise<std::vector<std::string>>>>::withValue(value);
  }
  inline Result_std__shared_ptr_Promise_std__vector_std__string____ create_Result_std__shared_ptr_Promise_std__vector_std__string____(const std::exception_ptr& error) {
    return Result<std::shared_ptr<Promise<std::vector<std::string>>>>::withError(error);
  }
  
  // pragma MARK: std::shared_ptr<Promise<void>>
  /**
   * Specialized version of `std::shared_ptr<Promise<void>>`.
   */
  using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
  inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() {
    return Promise<void>::create();
  }
  inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) {
    return PromiseHolder<void>(std::move(promise));
  }
  
  // pragma MARK: std::function<void()>
  /**
   * Specialized version of `std::function<void()>`.
   */
  using Func_void = std::function<void()>;
  /**
   * Wrapper class for a `std::function<void()>`, this can be used from Swift.
   */
  class Func_void_Wrapper final {
  public:
    explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_shared<std::function<void()>>(std::move(func))) {}
    inline void call() const {
      _function->operator()();
    }
  private:
    std::shared_ptr<std::function<void()>> _function;
  };
  Func_void create_Func_void(void* _Nonnull swiftClosureWrapper);
  inline Func_void_Wrapper wrap_Func_void(Func_void value) {
    return Func_void_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>
  /**
   * Specialized version of `std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>`.
   */
  using std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec_ = std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>;
  std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec> create_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec_(void* _Nonnull swiftUnsafePointer);
  void* _Nonnull get_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec_(std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<margelo::nitro::fastio::HybridInputStreamSpec>
  using std__weak_ptr_margelo__nitro__fastio__HybridInputStreamSpec_ = std::weak_ptr<margelo::nitro::fastio::HybridInputStreamSpec>;
  inline std__weak_ptr_margelo__nitro__fastio__HybridInputStreamSpec_ weakify_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec_(const std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>& strong) { return strong; }
  
  // pragma MARK: std::optional<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>>
  /**
   * Specialized version of `std::optional<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>>`.
   */
  using std__optional_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec__ = std::optional<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>>;
  inline std::optional<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>> create_std__optional_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec__(const std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>& value) {
    return std::optional<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>>(value);
  }
  
  // pragma MARK: std::shared_ptr<margelo::nitro::fastio::HybridNetworkSpec>
  /**
   * Specialized version of `std::shared_ptr<margelo::nitro::fastio::HybridNetworkSpec>`.
   */
  using std__shared_ptr_margelo__nitro__fastio__HybridNetworkSpec_ = std::shared_ptr<margelo::nitro::fastio::HybridNetworkSpec>;
  std::shared_ptr<margelo::nitro::fastio::HybridNetworkSpec> create_std__shared_ptr_margelo__nitro__fastio__HybridNetworkSpec_(void* _Nonnull swiftUnsafePointer);
  void* _Nonnull get_std__shared_ptr_margelo__nitro__fastio__HybridNetworkSpec_(std__shared_ptr_margelo__nitro__fastio__HybridNetworkSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<margelo::nitro::fastio::HybridNetworkSpec>
  using std__weak_ptr_margelo__nitro__fastio__HybridNetworkSpec_ = std::weak_ptr<margelo::nitro::fastio::HybridNetworkSpec>;
  inline std__weak_ptr_margelo__nitro__fastio__HybridNetworkSpec_ weakify_std__shared_ptr_margelo__nitro__fastio__HybridNetworkSpec_(const std::shared_ptr<margelo::nitro::fastio::HybridNetworkSpec>& strong) { return strong; }
  
  // pragma MARK: Result<std::shared_ptr<Promise<void>>>
  using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
  inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) {
    return Result<std::shared_ptr<Promise<void>>>::withValue(value);
  }
  inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) {
    return Result<std::shared_ptr<Promise<void>>>::withError(error);
  }
  
  // pragma MARK: std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>
  /**
   * Specialized version of `std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>`.
   */
  using std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___ = std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>;
  inline std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> create_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___() {
    return Promise<std::shared_ptr<ArrayBuffer>>::create();
  }
  inline PromiseHolder<std::shared_ptr<ArrayBuffer>> wrap_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___(std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> promise) {
    return PromiseHolder<std::shared_ptr<ArrayBuffer>>(std::move(promise));
  }
  
  // pragma MARK: std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>
  /**
   * Specialized version of `std::function<void(const std::shared_ptr<ArrayBuffer>&)>`.
   */
  using Func_void_std__shared_ptr_ArrayBuffer_ = std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>;
  /**
   * Wrapper class for a `std::function<void(const std::shared_ptr<ArrayBuffer>& / * result * /)>`, this can be used from Swift.
   */
  class Func_void_std__shared_ptr_ArrayBuffer__Wrapper final {
  public:
    explicit Func_void_std__shared_ptr_ArrayBuffer__Wrapper(std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>&& func): _function(std::make_shared<std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>>(std::move(func))) {}
    inline void call(ArrayBufferHolder result) const {
      _function->operator()(result.getArrayBuffer());
    }
  private:
    std::shared_ptr<std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>> _function;
  };
  Func_void_std__shared_ptr_ArrayBuffer_ create_Func_void_std__shared_ptr_ArrayBuffer_(void* _Nonnull swiftClosureWrapper);
  inline Func_void_std__shared_ptr_ArrayBuffer__Wrapper wrap_Func_void_std__shared_ptr_ArrayBuffer_(Func_void_std__shared_ptr_ArrayBuffer_ value) {
    return Func_void_std__shared_ptr_ArrayBuffer__Wrapper(std::move(value));
  }
  
  // pragma MARK: Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>
  using Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ = Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>;
  inline Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ create_Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____(const std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>& value) {
    return Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>::withValue(value);
  }
  inline Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ create_Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____(const std::exception_ptr& error) {
    return Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>::withError(error);
  }
  
  // pragma MARK: Result<void>
  using Result_void_ = Result<void>;
  inline Result_void_ create_Result_void_() {
    return Result<void>::withValue();
  }
  inline Result_void_ create_Result_void_(const std::exception_ptr& error) {
    return Result<void>::withError(error);
  }
  
  // pragma MARK: std::shared_ptr<margelo::nitro::fastio::HybridOutputStreamSpec>
  /**
   * Specialized version of `std::shared_ptr<margelo::nitro::fastio::HybridOutputStreamSpec>`.
   */
  using std__shared_ptr_margelo__nitro__fastio__HybridOutputStreamSpec_ = std::shared_ptr<margelo::nitro::fastio::HybridOutputStreamSpec>;
  std::shared_ptr<margelo::nitro::fastio::HybridOutputStreamSpec> create_std__shared_ptr_margelo__nitro__fastio__HybridOutputStreamSpec_(void* _Nonnull swiftUnsafePointer);
  void* _Nonnull get_std__shared_ptr_margelo__nitro__fastio__HybridOutputStreamSpec_(std__shared_ptr_margelo__nitro__fastio__HybridOutputStreamSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<margelo::nitro::fastio::HybridOutputStreamSpec>
  using std__weak_ptr_margelo__nitro__fastio__HybridOutputStreamSpec_ = std::weak_ptr<margelo::nitro::fastio::HybridOutputStreamSpec>;
  inline std__weak_ptr_margelo__nitro__fastio__HybridOutputStreamSpec_ weakify_std__shared_ptr_margelo__nitro__fastio__HybridOutputStreamSpec_(const std::shared_ptr<margelo::nitro::fastio::HybridOutputStreamSpec>& strong) { return strong; }
  
  // pragma MARK: std::shared_ptr<margelo::nitro::fastio::HybridDuplexStreamSpec>
  /**
   * Specialized version of `std::shared_ptr<margelo::nitro::fastio::HybridDuplexStreamSpec>`.
   */
  using std__shared_ptr_margelo__nitro__fastio__HybridDuplexStreamSpec_ = std::shared_ptr<margelo::nitro::fastio::HybridDuplexStreamSpec>;
  std::shared_ptr<margelo::nitro::fastio::HybridDuplexStreamSpec> create_std__shared_ptr_margelo__nitro__fastio__HybridDuplexStreamSpec_(void* _Nonnull swiftUnsafePointer);
  void* _Nonnull get_std__shared_ptr_margelo__nitro__fastio__HybridDuplexStreamSpec_(std__shared_ptr_margelo__nitro__fastio__HybridDuplexStreamSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<margelo::nitro::fastio::HybridDuplexStreamSpec>
  using std__weak_ptr_margelo__nitro__fastio__HybridDuplexStreamSpec_ = std::weak_ptr<margelo::nitro::fastio::HybridDuplexStreamSpec>;
  inline std__weak_ptr_margelo__nitro__fastio__HybridDuplexStreamSpec_ weakify_std__shared_ptr_margelo__nitro__fastio__HybridDuplexStreamSpec_(const std::shared_ptr<margelo::nitro::fastio::HybridDuplexStreamSpec>& strong) { return strong; }
  
  // pragma MARK: std::shared_ptr<margelo::nitro::fastio::HybridStreamFactorySpec>
  /**
   * Specialized version of `std::shared_ptr<margelo::nitro::fastio::HybridStreamFactorySpec>`.
   */
  using std__shared_ptr_margelo__nitro__fastio__HybridStreamFactorySpec_ = std::shared_ptr<margelo::nitro::fastio::HybridStreamFactorySpec>;
  std::shared_ptr<margelo::nitro::fastio::HybridStreamFactorySpec> create_std__shared_ptr_margelo__nitro__fastio__HybridStreamFactorySpec_(void* _Nonnull swiftUnsafePointer);
  void* _Nonnull get_std__shared_ptr_margelo__nitro__fastio__HybridStreamFactorySpec_(std__shared_ptr_margelo__nitro__fastio__HybridStreamFactorySpec_ cppType);
  
  // pragma MARK: std::weak_ptr<margelo::nitro::fastio::HybridStreamFactorySpec>
  using std__weak_ptr_margelo__nitro__fastio__HybridStreamFactorySpec_ = std::weak_ptr<margelo::nitro::fastio::HybridStreamFactorySpec>;
  inline std__weak_ptr_margelo__nitro__fastio__HybridStreamFactorySpec_ weakify_std__shared_ptr_margelo__nitro__fastio__HybridStreamFactorySpec_(const std::shared_ptr<margelo::nitro::fastio::HybridStreamFactorySpec>& strong) { return strong; }
  
  // pragma MARK: Result<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>>
  using Result_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec__ = Result<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>>;
  inline Result_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec__ create_Result_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec__(const std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>& value) {
    return Result<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>>::withValue(value);
  }
  inline Result_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec__ create_Result_std__shared_ptr_margelo__nitro__fastio__HybridInputStreamSpec__(const std::exception_ptr& error) {
    return Result<std::shared_ptr<margelo::nitro::fastio::HybridInputStreamSpec>>::withError(error);
  }
  
  // pragma MARK: std::function<void(const std::string& /* selectedProtocol */)>
  /**
   * Specialized version of `std::function<void(const std::string&)>`.
   */
  using Func_void_std__string = std::function<void(const std::string& /* selectedProtocol */)>;
  /**
   * Wrapper class for a `std::function<void(const std::string& / * selectedProtocol * /)>`, this can be used from Swift.
   */
  class Func_void_std__string_Wrapper final {
  public:
    explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* selectedProtocol */)>&& func): _function(std::make_shared<std::function<void(const std::string& /* selectedProtocol */)>>(std::move(func))) {}
    inline void call(std::string selectedProtocol) const {
      _function->operator()(selectedProtocol);
    }
  private:
    std::shared_ptr<std::function<void(const std::string& /* selectedProtocol */)>> _function;
  };
  Func_void_std__string create_Func_void_std__string(void* _Nonnull swiftClosureWrapper);
  inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) {
    return Func_void_std__string_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::function<void(double /* code */, const std::string& /* reason */)>
  /**
   * Specialized version of `std::function<void(double, const std::string&)>`.
   */
  using Func_void_double_std__string = std::function<void(double /* code */, const std::string& /* reason */)>;
  /**
   * Wrapper class for a `std::function<void(double / * code * /, const std::string& / * reason * /)>`, this can be used from Swift.
   */
  class Func_void_double_std__string_Wrapper final {
  public:
    explicit Func_void_double_std__string_Wrapper(std::function<void(double /* code */, const std::string& /* reason */)>&& func): _function(std::make_shared<std::function<void(double /* code */, const std::string& /* reason */)>>(std::move(func))) {}
    inline void call(double code, std::string reason) const {
      _function->operator()(code, reason);
    }
  private:
    std::shared_ptr<std::function<void(double /* code */, const std::string& /* reason */)>> _function;
  };
  Func_void_double_std__string create_Func_void_double_std__string(void* _Nonnull swiftClosureWrapper);
  inline Func_void_double_std__string_Wrapper wrap_Func_void_double_std__string(Func_void_double_std__string value) {
    return Func_void_double_std__string_Wrapper(std::move(value));
  }
  
  // pragma MARK: std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>
  /**
   * Specialized version of `std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>`.
   */
  using std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec_ = std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>;
  std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec> create_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec_(void* _Nonnull swiftUnsafePointer);
  void* _Nonnull get_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec_(std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<margelo::nitro::fastio::HybridWebSocketSpec>
  using std__weak_ptr_margelo__nitro__fastio__HybridWebSocketSpec_ = std::weak_ptr<margelo::nitro::fastio::HybridWebSocketSpec>;
  inline std__weak_ptr_margelo__nitro__fastio__HybridWebSocketSpec_ weakify_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec_(const std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>& strong) { return strong; }
  
  // pragma MARK: std::shared_ptr<margelo::nitro::fastio::HybridWebSocketManagerSpec>
  /**
   * Specialized version of `std::shared_ptr<margelo::nitro::fastio::HybridWebSocketManagerSpec>`.
   */
  using std__shared_ptr_margelo__nitro__fastio__HybridWebSocketManagerSpec_ = std::shared_ptr<margelo::nitro::fastio::HybridWebSocketManagerSpec>;
  std::shared_ptr<margelo::nitro::fastio::HybridWebSocketManagerSpec> create_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketManagerSpec_(void* _Nonnull swiftUnsafePointer);
  void* _Nonnull get_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketManagerSpec_(std__shared_ptr_margelo__nitro__fastio__HybridWebSocketManagerSpec_ cppType);
  
  // pragma MARK: std::weak_ptr<margelo::nitro::fastio::HybridWebSocketManagerSpec>
  using std__weak_ptr_margelo__nitro__fastio__HybridWebSocketManagerSpec_ = std::weak_ptr<margelo::nitro::fastio::HybridWebSocketManagerSpec>;
  inline std__weak_ptr_margelo__nitro__fastio__HybridWebSocketManagerSpec_ weakify_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketManagerSpec_(const std::shared_ptr<margelo::nitro::fastio::HybridWebSocketManagerSpec>& strong) { return strong; }
  
  // pragma MARK: Result<std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>>
  using Result_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec__ = Result<std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>>;
  inline Result_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec__ create_Result_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec__(const std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>& value) {
    return Result<std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>>::withValue(value);
  }
  inline Result_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec__ create_Result_std__shared_ptr_margelo__nitro__fastio__HybridWebSocketSpec__(const std::exception_ptr& error) {
    return Result<std::shared_ptr<margelo::nitro::fastio::HybridWebSocketSpec>>::withError(error);
  }

} // namespace margelo::nitro::fastio::bridge::swift
