pub struct Fragment(/* private fields */);Expand description
URI fragment.
Implementations§
source§impl Fragment
impl Fragment
sourcepub fn new<T: ?Sized + AsRef<[u8]>>(
input: &T,
) -> Result<&Self, InvalidFragment<&T>>
pub fn new<T: ?Sized + AsRef<[u8]>>( input: &T, ) -> Result<&Self, InvalidFragment<&T>>
Creates a new URI fragment by parsing the input value
sourcepub const unsafe fn new_unchecked(input: &[u8]) -> &Self
pub const unsafe fn new_unchecked(input: &[u8]) -> &Self
Creates a new URI fragment from the input value without validation.
§Safety
The input data must be a valid URI fragment.
Methods from Deref<Target = PctStr>§
Trait Implementations§
source§impl AsRef<Fragment> for FragmentBuf
impl AsRef<Fragment> for FragmentBuf
source§impl Borrow<Fragment> for FragmentBuf
impl Borrow<Fragment> for FragmentBuf
source§impl<'a> PartialEq<&'a Fragment> for FragmentBuf
impl<'a> PartialEq<&'a Fragment> for FragmentBuf
source§impl<'a> PartialEq<&'a str> for Fragment
impl<'a> PartialEq<&'a str> for Fragment
source§impl PartialEq<Fragment> for FragmentBuf
impl PartialEq<Fragment> for FragmentBuf
source§impl PartialEq for Fragment
impl PartialEq for Fragment
source§impl<'a> PartialOrd<&'a Fragment> for FragmentBuf
impl<'a> PartialOrd<&'a Fragment> for FragmentBuf
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl PartialOrd<Fragment> for FragmentBuf
impl PartialOrd<Fragment> for FragmentBuf
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl PartialOrd for Fragment
impl PartialOrd for Fragment
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl ToOwned for Fragment
impl ToOwned for Fragment
§type Owned = FragmentBuf
type Owned = FragmentBuf
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> FragmentBuf
fn to_owned(&self) -> FragmentBuf
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more