Document why gix-url::Url doesn't have String serialization and password handling behavior
#2223
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.
Summary
This PR adds comprehensive documentation to the
gix-url::Urlstruct explaining:Stringserialization (noInto<String>orFrom<Url> for Stringimplementation)serdefeatureChanges
Added a new Serialization section to the
Urlstruct documentation that clarifies:String Serialization
The type does not implement
Into<String>orFrom<Url> for Stringbecause URLs can contain non-UTF-8 sequences in the path component. Users should instead:to_bstring()for lossless serialization toBStringDisplaytrait for a UTF-8 representation that redacts passwords for safe loggingPassword Handling
serdefeature is enabled,serde::Serializeandserde::Deserializewill serialize all fields including passwordsDisplaytrait or in any other context unless theserdefeature is explicitly enabled and serde serialization is usedThis documentation helps users understand the security implications of different serialization methods and choose the appropriate one for their use case.
Example
Fixes the documentation gap identified in the issue.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.