Struct iref_core::uri::UserInfoBuf
source · pub struct UserInfoBuf(/* private fields */);Expand description
Owned URI user info.
Implementations§
source§impl UserInfoBuf
impl UserInfoBuf
sourcepub fn new(input: Vec<u8>) -> Result<Self, InvalidUserInfo<Vec<u8>>>
pub fn new(input: Vec<u8>) -> Result<Self, InvalidUserInfo<Vec<u8>>>
Creates a new owned URI user info by parsing the input value
sourcepub const unsafe fn new_unchecked(input: Vec<u8>) -> Self
pub const unsafe fn new_unchecked(input: Vec<u8>) -> Self
Creates a new owned URI user info from the input value without validation.
§Safety
The input data must be a valid URI user info.
pub fn as_user_info(&self) -> &UserInfo
source§impl UserInfoBuf
impl UserInfoBuf
pub fn into_string(self) -> String
source§impl UserInfoBuf
impl UserInfoBuf
source§impl UserInfoBuf
impl UserInfoBuf
pub fn into_pct_string(self) -> PctString
Methods from Deref<Target = UserInfo>§
pub const EMPTY: &'static Self = _
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_str(&self) -> &str
sourcepub fn as_pct_str(&self) -> &PctStr
pub fn as_pct_str(&self) -> &PctStr
Returns the host as a percent-encoded string slice.
Methods from Deref<Target = PctStr>§
Trait Implementations§
source§impl AsRef<[u8]> for UserInfoBuf
impl AsRef<[u8]> for UserInfoBuf
source§impl AsRef<UserInfo> for UserInfoBuf
impl AsRef<UserInfo> for UserInfoBuf
source§impl AsRef<str> for UserInfoBuf
impl AsRef<str> for UserInfoBuf
source§impl Borrow<[u8]> for UserInfoBuf
impl Borrow<[u8]> for UserInfoBuf
source§impl Borrow<UserInfo> for UserInfoBuf
impl Borrow<UserInfo> for UserInfoBuf
source§impl Clone for UserInfoBuf
impl Clone for UserInfoBuf
source§fn clone(&self) -> UserInfoBuf
fn clone(&self) -> UserInfoBuf
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for UserInfoBuf
impl Debug for UserInfoBuf
source§impl Default for UserInfoBuf
impl Default for UserInfoBuf
source§impl Deref for UserInfoBuf
impl Deref for UserInfoBuf
source§impl Display for UserInfoBuf
impl Display for UserInfoBuf
source§impl From<UserInfoBuf> for String
impl From<UserInfoBuf> for String
source§fn from(value: UserInfoBuf) -> String
fn from(value: UserInfoBuf) -> String
Converts to this type from the input type.
source§impl FromStr for UserInfoBuf
impl FromStr for UserInfoBuf
source§impl Hash for UserInfoBuf
impl Hash for UserInfoBuf
source§impl Ord for UserInfoBuf
impl Ord for UserInfoBuf
source§impl<'a> PartialEq<&'a UserInfo> for UserInfoBuf
impl<'a> PartialEq<&'a UserInfo> for UserInfoBuf
source§impl PartialEq<UserInfo> for UserInfoBuf
impl PartialEq<UserInfo> for UserInfoBuf
source§impl PartialEq for UserInfoBuf
impl PartialEq for UserInfoBuf
source§impl<'a> PartialOrd<&'a UserInfo> for UserInfoBuf
impl<'a> PartialOrd<&'a UserInfo> for UserInfoBuf
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<UserInfo> for UserInfoBuf
impl PartialOrd<UserInfo> for UserInfoBuf
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 UserInfoBuf
impl PartialOrd for UserInfoBuf
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 TryFrom<String> for UserInfoBuf
impl TryFrom<String> for UserInfoBuf
§type Error = InvalidUserInfo<String>
type Error = InvalidUserInfo<String>
The type returned in the event of a conversion error.
source§fn try_from(input: String) -> Result<UserInfoBuf, InvalidUserInfo<String>>
fn try_from(input: String) -> Result<UserInfoBuf, InvalidUserInfo<String>>
Performs the conversion.
source§impl TryFrom<Vec<u8>> for UserInfoBuf
impl TryFrom<Vec<u8>> for UserInfoBuf
§type Error = InvalidUserInfo<Vec<u8>>
type Error = InvalidUserInfo<Vec<u8>>
The type returned in the event of a conversion error.
source§fn try_from(input: Vec<u8>) -> Result<UserInfoBuf, InvalidUserInfo<Vec<u8>>>
fn try_from(input: Vec<u8>) -> Result<UserInfoBuf, InvalidUserInfo<Vec<u8>>>
Performs the conversion.
impl Eq for UserInfoBuf
Auto Trait Implementations§
impl Freeze for UserInfoBuf
impl RefUnwindSafe for UserInfoBuf
impl Send for UserInfoBuf
impl Sync for UserInfoBuf
impl Unpin for UserInfoBuf
impl UnwindSafe for UserInfoBuf
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)