File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ pub enum ArgumentSafety<'a> {
7676
7777/// A URL with support for specialized git related capabilities.
7878///
79- /// Additionally there is support for [deserialization](Url::from_bytes()) and [serialization](Url::to_bstring()).
79+ /// Additionally, there is support for [deserialization](Url::from_bytes()) and [serialization](Url::to_bstring()).
8080///
8181/// # Mutability Warning
8282///
@@ -85,6 +85,16 @@ pub enum ArgumentSafety<'a> {
8585/// parameters, but never be accepted as an instance of this type and then reconstructed, to maintain
8686/// validity guarantees.
8787///
88+ /// # Serialization
89+ ///
90+ /// This type does not implement `Into<String>`, `From<Url> for String` because URLs
91+ /// can contain non-UTF-8 sequences in the path component when parsed from raw bytes.
92+ /// Use [to_bstring()](Url::to_bstring()) for lossless serialization, or use the [`Display`](std::fmt::Display)
93+ /// trait for a UTF-8 representation that redacts passwords for safe logging.
94+ ///
95+ /// When the `serde` feature is enabled, this type implements `serde::Serialize` and `serde::Deserialize`,
96+ /// which will serialize *all* fields, including the password.
97+ ///
8898/// # Security Warning
8999///
90100/// URLs may contain passwords and using standard [formatting](std::fmt::Display) will redact
You can’t perform that action at this time.
0 commit comments