Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are twomajor changes in this PR:
Copilot summary
This pull request includes several changes aimed at improving the API design and error handling in the
azure_core_amqp
module. The most important changes include modifying builder methods to take ownership ofself
, adding adetach
method to theAmqpManagementApis
trait, and enhancing error handling in thefe2o3
management module.API Design Improvements:
sdk/core/azure_core_amqp/src/connection.rs
: Modified builder methods to take ownership ofself
instead of using mutable references. This change streamlines the builder pattern and ensures immutability after building. [1] [2]sdk/core/azure_core_amqp/src/sender.rs
: Similar modifications were made to the builder methods in the sender module to take ownership ofself
.Error Handling Enhancements:
sdk/core/azure_core_amqp/src/fe2o3/management.rs
: Enhanced error handling by adding theErrorKind
andError
types fromazure_core
. This change improves the granularity and clarity of error messages.sdk/core/azure_core_amqp/src/fe2o3/management.rs
: Added adetach
method to theAmqpManagementApis
trait and its implementations to properly handle the detachment of management clients. [1] [2] [3]Other Changes:
sdk/core/azure_core_amqp/src/noop.rs
: Implemented thedetach
method forNoopAmqpSender
to ensure consistency across different implementations.