pub(super) fn from_shared(s: Bytes) -> Result<Self, InvalidUri> {
        let authority_end = Authority::parse_non_empty(&s[..])?;

        if authority_end != s.len() {
            return Err(ErrorKind::InvalidUriChar.into());
        }

        Ok(Authority {
            data: unsafe { ByteStr::from_utf8_unchecked(s) },
        })
    }
// Not public while `bytes` is unstable.
Not public while `bytes` is unstable.
Not public while ` bytes ` is unstable .
pub(super) fn from_shared(s: Bytes) -> Result<Self, InvalidUri> {
        let authority_end = Authority::parse_non_empty(&s[..])?;
        if authority_end != s.len() {
            return Err(ErrorKind::InvalidUriChar.into());
        }
        Ok(Authority {
            data: unsafe { ByteStr::from_utf8_unchecked(s) },
        })
    }
pub ( super ) fn from_shared ( s : Bytes ) -> Result < Self , InvalidUri > { let authority_end = Authority :: parse_non_empty ( & s [ .. ] ) ? ; if authority_end != s . len ( ) { return Err ( ErrorKind :: InvalidUriChar . into ( ) ) ; } Ok ( Authority { data : unsafe { ByteStr :: from_utf8_unchecked ( s ) } , } ) }
Not public while `bytes` is unstable.
Not public while ` bytes ` is unstable .
s
Bytes
s
Bytes