pub fn from_maybe_shared<T>(src: T) -> Result<Self, InvalidUri>
    where
        T: AsRef<[u8]> + 'static,
    {
        if_downcast_into!(T, Bytes, src, {
            return Authority::from_shared(src);
        });

        Authority::try_from(src.as_ref())
    }
/// Attempt to convert a `Bytes` buffer to a `Authority`.
///
/// This will try to prevent a copy if the type passed is the type used
/// internally, and will copy the data if it is not.
Attempt to convert a `Bytes` buffer to a `Authority`.
This will try to prevent a copy if the type passed is the type used
internally, and will copy the data if it is not.
Attempt to convert a ` Bytes ` buffer to a ` Authority ` . This will try to prevent a copy if the type passed is the type used internally and will copy the data if it is not .
pub fn from_maybe_shared<T>(src: T) -> Result<Self, InvalidUri>
    where
        T: AsRef<[u8]> + 'static,
    {
        if_downcast_into!(T, Bytes, src, {
            return Authority::from_shared(src);
        });
        Authority::try_from(src.as_ref())
    }
pub fn from_maybe_shared < T > ( src : T ) -> Result < Self , InvalidUri > where T : AsRef < [ u8 ] > + ' static , { if_downcast_into ! ( T Bytes src { return Authority from_shared ( src ) } ) ; Authority :: try_from ( src . as_ref ( ) ) }
Attempt to convert a `Bytes` buffer to a `Authority`.
Attempt to convert a ` Bytes ` buffer to a ` Authority ` .
src
T
src
T