Skip to main content

ToDedicatedString

Trait ToDedicatedString 

Source
pub trait ToDedicatedString {
    type Target;

    // Required method
    fn try_to_dedicated_string(&self) -> Result<Self::Target, TryReserveError>;

    // Provided method
    fn to_dedicated_string(&self) -> Self::Target { ... }
}
Available on crate feature alloc only.
Expand description

A trait for types that can be converted to a dedicated allocated string types.

Required Associated Types§

Source

type Target

Conversion target type.

Required Methods§

Source

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

Converts the value to the allocated string.

Provided Methods§

Source

fn to_dedicated_string(&self) -> Self::Target

Converts the value to the allocated string.

§Panics

Panics if memory allocation error occured.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Source§

impl<S: Spec> ToDedicatedString for Built<'_, RiReferenceStr<S>>

Source§

impl<S: Spec> ToDedicatedString for Built<'_, RiRelativeStr<S>>

Source§

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

Source§

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

Source§

impl<S: Spec> ToDedicatedString for MappedToUri<'_, RiFragmentStr<S>>

Source§

impl<S: Spec> ToDedicatedString for MappedToUri<'_, RiQueryStr<S>>

Source§

impl<S: Spec> ToDedicatedString for MappedToUri<'_, RiReferenceStr<S>>

Source§

impl<S: Spec> ToDedicatedString for MappedToUri<'_, RiRelativeStr<S>>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<S: Spec> ToDedicatedString for PasswordMasked<'_, RiReferenceStr<S>>

Source§

impl<S: Spec> ToDedicatedString for PasswordMasked<'_, RiRelativeStr<S>>

Source§

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