File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,18 @@ 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>` or `From<Url> for String` because URLs can contain
91+ /// non-UTF-8 sequences in the path component. Use [to_bstring()](Url::to_bstring()) for lossless
92+ /// serialization, or use the [`Display`](std::fmt::Display) trait for a UTF-8 representation that
93+ /// 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 passwords. The password is never serialized through the
97+ /// `Display` trait or in any other context unless the `serde` feature is enabled and serde serialization
98+ /// is explicitly used.
99+ ///
88100/// # Security Warning
89101///
90102/// 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