We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8ddea7 commit 63e7d63Copy full SHA for 63e7d63
src/header/value.rs
@@ -198,6 +198,13 @@ impl HeaderValue {
198
///
199
/// This function does NOT validate that illegal bytes are not contained
200
/// within the buffer.
201
+ ///
202
+ /// ## Panics
203
+ /// In a debug build this will panic if `src` is not valid UTF-8.
204
205
+ /// ## Safety
206
+ /// `src` must contain valid UTF-8. In a release build it is undefined
207
+ /// behaviour to call this with `src` that is not valid UTF-8.
208
pub unsafe fn from_maybe_shared_unchecked<T>(src: T) -> HeaderValue
209
where
210
T: AsRef<[u8]> + 'static,
0 commit comments