pub type UriFragmentString = RiFragmentString<UriSpec>;
Available on crate feature
alloc
only.Expand description
A type alias for RiFragmentString
<
UriSpec
>
.
Aliased Type§
pub struct UriFragmentString { /* private fields */ }
Implementations
Source§impl<S: Spec> RiFragmentString<S>
impl<S: Spec> RiFragmentString<S>
Sourcepub unsafe fn new_unchecked(s: String) -> Self
pub unsafe fn new_unchecked(s: String) -> Self
Creates a new string without validation.
This does not validate the given string, so it is caller’s responsibility to ensure the given string is valid.
§Safety
The given string must be syntactically valid as Self
type.
If not, any use of the returned value or the call of this
function itself may result in undefined behavior.
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the inner buffer to match its length.
Sourcepub fn as_slice(&self) -> &RiFragmentStr<S>
pub fn as_slice(&self) -> &RiFragmentStr<S>
Returns the borrowed IRI string slice.
This is equivalent to &*self
.
Trait Implementations§
Source§impl AsRef<RiFragmentStr<IriSpec>> for UriFragmentString
impl AsRef<RiFragmentStr<IriSpec>> for UriFragmentString
Source§fn as_ref(&self) -> &IriFragmentStr
fn as_ref(&self) -> &IriFragmentStr
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<S: Spec> AsRef<RiFragmentStr<S>> for RiFragmentString<S>
impl<S: Spec> AsRef<RiFragmentStr<S>> for RiFragmentString<S>
Source§fn as_ref(&self) -> &RiFragmentStr<S>
fn as_ref(&self) -> &RiFragmentStr<S>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<S: Spec> Borrow<RiFragmentStr<S>> for RiFragmentString<S>
impl<S: Spec> Borrow<RiFragmentStr<S>> for RiFragmentString<S>
Source§fn borrow(&self) -> &RiFragmentStr<S>
fn borrow(&self) -> &RiFragmentStr<S>
Immutably borrows from an owned value. Read more
Source§impl<S: Spec> Clone for RiFragmentString<S>
impl<S: Spec> Clone for RiFragmentString<S>
Source§impl<S: Spec> Debug for RiFragmentString<S>
impl<S: Spec> Debug for RiFragmentString<S>
Source§impl<S: Spec> Deref for RiFragmentString<S>
impl<S: Spec> Deref for RiFragmentString<S>
Source§type Target = RiFragmentStr<S>
type Target = RiFragmentStr<S>
The resulting type after dereferencing.
Source§fn deref(&self) -> &RiFragmentStr<S>
fn deref(&self) -> &RiFragmentStr<S>
Dereferences the value.
Source§impl<'de, S: Spec> Deserialize<'de> for RiFragmentString<S>
Available on crate feature serde
only.
impl<'de, S: Spec> Deserialize<'de> for RiFragmentString<S>
Available on crate feature
serde
only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<S: Spec> Display for RiFragmentString<S>
impl<S: Spec> Display for RiFragmentString<S>
Source§impl<S: Spec> From<&RiFragmentStr<S>> for RiFragmentString<S>
impl<S: Spec> From<&RiFragmentStr<S>> for RiFragmentString<S>
Source§fn from(s: &RiFragmentStr<S>) -> Self
fn from(s: &RiFragmentStr<S>) -> Self
Converts to this type from the input type.