Struct iri_string::normalize::Normalized
source · [−]pub struct Normalized<'a, T: ?Sized> { /* private fields */ }
Expand description
Normalized OR resolved IRI.
Resolved IRI can be represented by this type. In that case, the result might
not be normalized. If you want the IRI resolution result to be normalized,
use enable_normalization
method.
Implementations
sourceimpl<'a, T: ?Sized> Normalized<'a, T>
impl<'a, T: ?Sized> Normalized<'a, T>
sourcepub fn enable_normalization(&mut self)
pub fn enable_normalization(&mut self)
Enables the case normalization and percent-encoding normalization.
sourcepub fn and_normalize(self) -> Self
pub fn and_normalize(self) -> Self
Returns Self
with normalization enabled.
sourcepub fn ensure_rfc3986_normalizable(&self) -> Result<(), Error>
pub fn ensure_rfc3986_normalizable(&self) -> Result<(), Error>
Checks if the path is normalizable by RFC 3986 algorithm.
Returns Ok(())
when normalizable, returns Err(_)
if not.
Trait Implementations
sourceimpl<T: ?Sized> Debug for Normalized<'_, T>
impl<T: ?Sized> Debug for Normalized<'_, T>
sourceimpl<S: Spec> Display for Normalized<'_, RiAbsoluteStr<S>>
impl<S: Spec> Display for Normalized<'_, RiAbsoluteStr<S>>
sourceimpl<S: Spec> Display for Normalized<'_, RiStr<S>>
impl<S: Spec> Display for Normalized<'_, RiStr<S>>
sourceimpl<S: Spec> From<&Normalized<'_, RiAbsoluteStr<S>>> for RiAbsoluteString<S>
impl<S: Spec> From<&Normalized<'_, RiAbsoluteStr<S>>> for RiAbsoluteString<S>
sourcefn from(v: &Normalized<'_, RiAbsoluteStr<S>>) -> Self
fn from(v: &Normalized<'_, RiAbsoluteStr<S>>) -> Self
Converts to this type from the input type.
sourceimpl<S: Spec> From<&Normalized<'_, RiStr<S>>> for RiString<S>
impl<S: Spec> From<&Normalized<'_, RiStr<S>>> for RiString<S>
sourcefn from(v: &Normalized<'_, RiStr<S>>) -> Self
fn from(v: &Normalized<'_, RiStr<S>>) -> Self
Converts to this type from the input type.
sourceimpl<S: Spec> From<Normalized<'_, RiAbsoluteStr<S>>> for RiAbsoluteString<S>
impl<S: Spec> From<Normalized<'_, RiAbsoluteStr<S>>> for RiAbsoluteString<S>
sourcefn from(v: Normalized<'_, RiAbsoluteStr<S>>) -> Self
fn from(v: Normalized<'_, RiAbsoluteStr<S>>) -> Self
Converts to this type from the input type.
sourceimpl<S: Spec> From<Normalized<'_, RiStr<S>>> for RiString<S>
impl<S: Spec> From<Normalized<'_, RiStr<S>>> for RiString<S>
sourcefn from(v: Normalized<'_, RiStr<S>>) -> Self
fn from(v: Normalized<'_, RiStr<S>>) -> Self
Converts to this type from the input type.
sourceimpl<S: Spec> ToDedicatedString for Normalized<'_, RiAbsoluteStr<S>>
impl<S: Spec> ToDedicatedString for Normalized<'_, RiAbsoluteStr<S>>
type Target = RiAbsoluteString<S>
type Target = RiAbsoluteString<S>
Conversion target type.
sourcefn try_to_dedicated_string(&self) -> Result<Self::Target, TryReserveError>
fn try_to_dedicated_string(&self) -> Result<Self::Target, TryReserveError>
Converts the value to the allocated string.
sourcefn to_dedicated_string(&self) -> Self::Target
fn to_dedicated_string(&self) -> Self::Target
Converts the value to the allocated string. Read more
sourceimpl<S: Spec> ToDedicatedString for Normalized<'_, RiStr<S>>
impl<S: Spec> ToDedicatedString for Normalized<'_, RiStr<S>>
sourcefn try_to_dedicated_string(&self) -> Result<Self::Target, TryReserveError>
fn try_to_dedicated_string(&self) -> Result<Self::Target, TryReserveError>
Converts the value to the allocated string.
sourcefn to_dedicated_string(&self) -> Self::Target
fn to_dedicated_string(&self) -> Self::Target
Converts the value to the allocated string. Read more
Auto Trait Implementations
impl<'a, T: ?Sized> RefUnwindSafe for Normalized<'a, T>
impl<'a, T: ?Sized> Send for Normalized<'a, T>
impl<'a, T: ?Sized> Sync for Normalized<'a, T>
impl<'a, T: ?Sized> Unpin for Normalized<'a, T>
impl<'a, T: ?Sized> UnwindSafe for Normalized<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToStringFallible for T where
T: Display,
impl<T> ToStringFallible for T where
T: Display,
sourcefn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.