Struct Normalized

struct Normalized<'a, T: ?Sized> { ... }

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]Self::enable_normalization method.

Implementations

impl<'a, T: ?Sized> Normalized<'a, T>

fn enable_normalization(self: &mut Self)

Enables the normalization.

This lets the normalizer apply the case normalization, percent-encoding normalization, and dot segments removal.

fn enable_normalization_preserving_authorityless_relative_path(self: &mut Self)

Enables the normalization that preserve relative path under some condition.

Note that this normalization algorithm is not compatible with RFC 3986 algorithm for some inputs.

See [RiStr::normalize_but_preserve_authorityless_relative_path()] for detail.

fn and_normalize(self: Self) -> Self

Returns Self with normalization enabled.

fn and_normalize_but_preserve_authorityless_relative_path(self: Self) -> Self

Returns Self with special normalization enabled.

Note that this normalization algorithm is not compatible with RFC 3986 algorithm for some inputs.

See [RiStr::normalize_but_preserve_authorityless_relative_path()] for detail.

fn ensure_rfc3986_normalizable(self: &Self) -> Result<(), Error>

Checks if the path is normalizable by RFC 3986 algorithm.

Returns Ok(()) when normalizable, returns Err(_) if not.

impl<'a, T> Freeze for Normalized<'a, T>

impl<'a, T> RefUnwindSafe for Normalized<'a, T>

impl<'a, T> Send for Normalized<'a, T>

impl<'a, T> Sync for Normalized<'a, T>

impl<'a, T> Unpin for Normalized<'a, T>

impl<'a, T> UnsafeUnpin for Normalized<'a, T>

impl<'a, T> UnwindSafe for Normalized<'a, T>

impl<S: Spec> Display for Normalized<'_, RiAbsoluteStr<S>>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<S: Spec> Display for Normalized<'_, RiStr<S>>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<S: Spec> ToDedicatedString for Normalized<'_, RiAbsoluteStr<S>>

fn try_to_dedicated_string(self: &Self) -> Result<<Self as >::Target, TryReserveError>

impl<S: Spec> ToDedicatedString for Normalized<'_, RiStr<S>>

fn try_to_dedicated_string(self: &Self) -> Result<<Self as >::Target, TryReserveError>

impl<T> Any for Normalized<'a, T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Normalized<'a, T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Normalized<'a, T>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for Normalized<'a, T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToString for Normalized<'a, T>

fn to_string(self: &Self) -> String

impl<T> ToStringFallible for Normalized<'a, T>

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 Normalized<'a, T>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Normalized<'a, T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Normalized<'a, T>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T: ?Sized> Debug for Normalized<'_, T>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result