Struct RiAbsoluteString
struct RiAbsoluteString<S> { ... }
An owned string of an absolute IRI without fragment part.
This corresponds to absolute-IRI rule in RFC 3987
(and absolute-URI rule in RFC 3986).
The rule for absolute-IRI is scheme ":" ihier-part [ "?" iquery ].
In other words, this is RiString without fragment part.
If you want to accept fragment part, use RiString.
For details, see the document for RiAbsoluteStr.
Enabled by alloc or std feature.
Implementations
impl RiAbsoluteString<IriSpec>
fn encode_to_uri_inline(self: &mut Self)Percent-encodes the IRI into a valid URI that identifies the equivalent resource.
After the encode, the IRI is also a valid URI.
If you want a new URI string rather than modifying the IRI string, or if you need more precise control over memory allocation and buffer handling, use [
encode_to_uri]IriAbsoluteStr::encode_to_urimethod.Panics
Panics if the memory allocation failed.
Examples
# use Error; # Ok::fn try_encode_to_uri_inline(self: &mut Self) -> Result<(), TryReserveError>Percent-encodes the IRI into a valid URI that identifies the equivalent resource.
After the encode, the IRI is also a valid URI.
If you want a new URI string rather than modifying the IRI string, or if you need more precise control over memory allocation and buffer handling, use [
encode_to_uri]IriAbsoluteStr::encode_to_urimethod.Examples
# use Error; # Ok::fn encode_into_uri(self: Self) -> UriAbsoluteStringPercent-encodes the IRI into a valid URI that identifies the equivalent resource.
If you want a new URI string rather than modifying the IRI string, or if you need more precise control over memory allocation and buffer handling, use [
encode_to_uri]IriAbsoluteStr::encode_to_urimethod.Examples
# use Error; # Ok::fn try_encode_into_uri(self: Self) -> Result<UriAbsoluteString, TryReserveError>Percent-encodes the IRI into a valid URI that identifies the equivalent resource.
If you want a new URI string rather than modifying the IRI string, or if you need more precise control over memory allocation and buffer handling, use [
encode_to_uri]IriAbsoluteStr::encode_to_urimethod.Examples
# use Error; # Ok::fn try_into_uri(self: Self) -> Result<UriAbsoluteString, IriAbsoluteString>Converts an IRI into a URI without modification, if possible.
Examples
# use Error; use ; let ascii_iri = try_from?; assert_eq!; let nonascii_iri = try_from?; assert_eq!; # Ok::
impl<S: Spec> RiAbsoluteString<S>
fn remove_password_inline(self: &mut Self)Removes the password completely (including separator colon) from
selfeven if it is empty.Examples
# use Error; # # Ok::Even if the password is empty, the password and separator will be removed.
# use Error; # # Ok::fn remove_nonempty_password_inline(self: &mut Self)Replaces the non-empty password in
selfto the empty password.This leaves the separator colon if the password part was available.
Examples
# use Error; # # Ok::If the password is empty, it is left as is.
# use Error; # # Ok::
impl<S: crate::spec::Spec> RiAbsoluteString<S>
unsafe fn new_unchecked(s: String) -> SelfCreates 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
Selftype. If not, any use of the returned value or the call of this function itself may result in undefined behavior.fn shrink_to_fit(self: &mut Self)Shrinks the capacity of the inner buffer to match its length.
fn capacity(self: &Self) -> usizeReturns the internal buffer capacity in bytes.
fn as_slice(self: &Self) -> &RiAbsoluteStr<S>Returns the borrowed IRI string slice.
This is equivalent to
&*self.
impl<P, T> Receiver for RiAbsoluteString<S>
impl<S> Freeze for RiAbsoluteString<S>
impl<S> RefUnwindSafe for RiAbsoluteString<S>
impl<S> Send for RiAbsoluteString<S>
impl<S> Sync for RiAbsoluteString<S>
impl<S> Unpin for RiAbsoluteString<S>
impl<S> UnsafeUnpin for RiAbsoluteString<S>
impl<S> UnwindSafe for RiAbsoluteString<S>
impl<S: Spec> From for RiAbsoluteString<S>
fn from(builder: &Built<'_, RiAbsoluteStr<S>>) -> Self
impl<S: Spec> From for RiAbsoluteString<S>
fn from(v: &Normalized<'_, RiAbsoluteStr<S>>) -> Self
impl<S: Spec> From for RiAbsoluteString<S>
fn from(builder: Built<'_, RiAbsoluteStr<S>>) -> Self
impl<S: Spec> From for RiAbsoluteString<S>
fn from(v: Normalized<'_, RiAbsoluteStr<S>>) -> Self
impl<S: Spec, C: Context> TryFrom for RiAbsoluteString<S>
fn try_from(v: Expanded<'_, S, C>) -> Result<Self, <Self as >::Error>
impl<S: crate::spec::Spec> AsRef for RiAbsoluteString<S>
fn as_ref(self: &Self) -> &str
impl<S: crate::spec::Spec> AsRef for RiAbsoluteString<S>
fn as_ref(self: &Self) -> &RiStr<S>
impl<S: crate::spec::Spec> AsRef for RiAbsoluteString<S>
fn as_ref(self: &Self) -> &RiReferenceStr<S>
impl<S: crate::spec::Spec> AsRef for RiAbsoluteString<S>
fn as_ref(self: &Self) -> &RiAbsoluteStr<S>
impl<S: crate::spec::Spec> Borrow for RiAbsoluteString<S>
fn borrow(self: &Self) -> &RiAbsoluteStr<S>
impl<S: crate::spec::Spec> Borrow for RiAbsoluteString<S>
fn borrow(self: &Self) -> &str
impl<S: crate::spec::Spec> Clone for RiAbsoluteString<S>
fn clone(self: &Self) -> Self
impl<S: crate::spec::Spec> Debug for RiAbsoluteString<S>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<S: crate::spec::Spec> Deref for RiAbsoluteString<S>
fn deref(self: &Self) -> &RiAbsoluteStr<S>
impl<S: crate::spec::Spec> Display for RiAbsoluteString<S>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<S: crate::spec::Spec> Eq for RiAbsoluteString<S>
impl<S: crate::spec::Spec> From for RiAbsoluteString<S>
fn from(s: &RiAbsoluteStr<S>) -> Self
impl<S: crate::spec::Spec> FromStr for RiAbsoluteString<S>
fn from_str(s: &str) -> Result<Self, <Self as >::Err>
impl<S: crate::spec::Spec> Hash for RiAbsoluteString<S>
fn hash<H: core::hash::Hasher>(self: &Self, state: &mut H)
impl<S: crate::spec::Spec> Ord for RiAbsoluteString<S>
fn cmp(self: &Self, other: &Self) -> Ordering
impl<S: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &String) -> bool
impl<S: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &Cow<'_, str>) -> bool
impl<S: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &&str) -> bool
impl<S: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &str) -> bool
impl<S: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &String) -> Option<Ordering>
impl<S: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &Cow<'_, str>) -> Option<Ordering>
impl<S: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &&str) -> Option<Ordering>
impl<S: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &str) -> Option<Ordering>
impl<S: crate::spec::Spec> TryFrom for RiAbsoluteString<S>
fn try_from(s: RiString<S>) -> Result<Self, <Self as >::Error>
impl<S: crate::spec::Spec> TryFrom for RiAbsoluteString<S>
fn try_from(s: &str) -> Result<Self, <Self as >::Error>
impl<S: crate::spec::Spec> TryFrom for RiAbsoluteString<S>
fn try_from(s: RiReferenceString<S>) -> Result<Self, <Self as >::Error>
impl<S: crate::spec::Spec> TryFrom for RiAbsoluteString<S>
fn try_from(bytes: &[u8]) -> Result<Self, <Self as >::Error>
impl<S: crate::spec::Spec> TryFrom for RiAbsoluteString<S>
fn try_from(s: String) -> Result<Self, <Self as >::Error>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &RiReferenceString<T>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &Cow<'_, RiReferenceStr<T>>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &&RiReferenceStr<T>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &RiReferenceStr<T>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &RiString<T>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &Cow<'_, RiStr<T>>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &&RiStr<T>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, o: &RiStr<T>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<S>
fn eq(self: &Self, other: &RiAbsoluteString<T>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<T>
fn eq(self: &Self, o: &Cow<'_, RiAbsoluteStr<S>>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<T>
fn eq(self: &Self, o: &&RiAbsoluteStr<S>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialEq for RiAbsoluteString<T>
fn eq(self: &Self, o: &RiAbsoluteStr<S>) -> bool
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &RiString<T>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &Cow<'_, RiStr<T>>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &&RiStr<T>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &RiStr<T>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &RiReferenceString<T>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &Cow<'_, RiReferenceStr<T>>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &&RiReferenceStr<T>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, o: &RiReferenceStr<T>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<S>
fn partial_cmp(self: &Self, other: &RiAbsoluteString<T>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<T>
fn partial_cmp(self: &Self, o: &Cow<'_, RiAbsoluteStr<S>>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<T>
fn partial_cmp(self: &Self, o: &&RiAbsoluteStr<S>) -> Option<Ordering>
impl<S: crate::spec::Spec, T: crate::spec::Spec> PartialOrd for RiAbsoluteString<T>
fn partial_cmp(self: &Self, o: &RiAbsoluteStr<S>) -> Option<Ordering>
impl<T> Any for RiAbsoluteString<S>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for RiAbsoluteString<S>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for RiAbsoluteString<S>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for RiAbsoluteString<S>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for RiAbsoluteString<S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for RiAbsoluteString<S>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for RiAbsoluteString<S>
fn to_string(self: &Self) -> String
impl<T> ToStringFallible for RiAbsoluteString<S>
fn try_to_string(self: &Self) -> Result<String, TryReserveError>[
ToString::to_string]alloc::string::ToString::to_string, but without panic on OOM.
impl<T, U> Into for RiAbsoluteString<S>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for RiAbsoluteString<S>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for RiAbsoluteString<S>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>