pub fn parse<S: AsRef<[u8]> + ?Sized>(s: &S) -> Result<Uri<&str>> {
        let bytes = s.as_ref();
        if bytes.len() > i32::MAX as usize {
            len_overflow();
        }
        // SAFETY: We're using the right pointer, length, capacity, and generics.
        unsafe { parser::parse(bytes.as_ptr() as *mut _, bytes.len() as u32, 0) }
    }
/// Parses a URI reference from a byte sequence into a `Uri<&str>`.
///
/// This function validates the input strictly except that UTF-8 validation is not
/// performed on a percent-encoded registered name (see [Section 3.2.2, RFC 3986][1]).
/// Care should be taken when dealing with such cases.
///
/// [1]: https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.2
///
/// # Panics
///
/// Panics if the input length is greater than [`i32::MAX`].
Parses a URI reference from a byte sequence into a `Uri<&str>`.
This function validates the input strictly except that UTF-8 validation is not
performed on a percent-encoded registered name .
Care should be taken when dealing with such cases.


Parses a URI reference from a byte sequence into a ` Uri<&str > ` . This function validates the input strictly except that UTF - 8 validation is not performed on a percent - encoded registered name . Care should be taken when dealing with such cases .
pub fn parse<S: AsRef<[u8]> + ?Sized>(s: &S) -> Result<Uri<&str>> {
        let bytes = s.as_ref();
        if bytes.len() > i32::MAX as usize {
            len_overflow();
        }
        // SAFETY: We're using the right pointer, length, capacity, and generics.
        unsafe { parser::parse(bytes.as_ptr() as *mut _, bytes.len() as u32, 0) }
    }
pub fn parse < S : AsRef < [ u8 ] > + ? Sized > ( s : & S ) -> Result < Uri < & str > > { let bytes = s . as_ref ( ) ; if bytes . len ( ) > i32 :: MAX as usize { len_overflow ( ) ; } // SAFETY: We're using the right pointer, length, capacity, and generics. unsafe { parser :: parse ( bytes . as_ptr ( ) as * mut _ , bytes . len ( ) as u32 , 0 ) } }
Parses a URI reference from a byte sequence into a `Uri<&str>`.
Parses a URI reference from a byte sequence into a ` Uri<&str > ` .
s
&S
s
&S
panics
Panics if the input length is greater than [`i32::MAX`].
Panics if the input length is greater than [ ` i32 :: MAX ` ] .