Skip to content

Conversation

JQiue
Copy link

@JQiue JQiue commented Apr 11, 2025

This pull request enhances the AsyncClient struct by deriving both the Debug and Clone traits. This addresses key usability limitations and improves the client's flexibility within various application architectures.

Motivation:

  • Improved Debuggability (Debug): As previously highlighted in other discussions, the ability to easily inspect the internal state of the AsyncClient during debugging is crucial for diagnosing issues, understanding client configuration, and managing connection pools. Deriving Debug provides a standardized and readily accessible way to achieve this.
  • Enhanced Flexibility (Clone): Deriving Clone enables the creation of independent copies of the AsyncClient. This is essential for scenarios such as:
    • Multi-threaded applications: Passing independent clients to different threads without ownership conflicts.
      Configuration variations: Creating multiple clients with slightly different configurations (e.g., different timeouts) without modifying the original client.

@kennetheversole
Copy link
Collaborator

How did you test this change?

@kennetheversole kennetheversole self-requested a review April 17, 2025 14:38
@JQiue
Copy link
Author

JQiue commented Apr 26, 2025

Just like this opened issue #214 , I have the need to derive pDebug and Clone for the async client Struct

@JQiue
Copy link
Author

JQiue commented Apr 26, 2025

Does deriving DebugandClone` not affect anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants