Struct uriparse::scheme::UnregisteredScheme[][src]

pub struct UnregisteredScheme<'scheme>(_);

A scheme that is not in the registered schemes.

This is case-insensitive, and this is reflected in the equality and hash functions.

Methods

impl<'scheme> UnregisteredScheme<'scheme>
[src]

Returns a str representation of the scheme.

The case-sensitivity of the original string is preserved.

Examples

use std::convert::TryFrom;

use uriparse::UnregisteredScheme;

let scheme = UnregisteredScheme::try_from("TEST-scheme").unwrap();
assert_eq!(scheme.as_str(), "TEST-scheme");

Converts the UnregisteredScheme into an owned copy.

If you construct the scheme from a source with a non-static lifetime, you may run into lifetime problems due to the way the struct is designed. Calling this function will ensure that the returned value has a static lifetime.

This is different from just cloning. Cloning the scheme will just copy the references, and thus the lifetime will remain the same.

Trait Implementations

impl<'scheme> Clone for UnregisteredScheme<'scheme>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'scheme> Debug for UnregisteredScheme<'scheme>
[src]

Formats the value using the given formatter. Read more

impl<'scheme> AsRef<[u8]> for UnregisteredScheme<'scheme>
[src]

Important traits for &'a [u8]

Performs the conversion.

impl<'scheme> AsRef<str> for UnregisteredScheme<'scheme>
[src]

Performs the conversion.

impl<'scheme> Display for UnregisteredScheme<'scheme>
[src]

Formats the value using the given formatter. Read more

impl<'scheme> Eq for UnregisteredScheme<'scheme>
[src]

impl<'scheme> From<UnregisteredScheme<'scheme>> for String
[src]

Performs the conversion.

impl<'scheme> Hash for UnregisteredScheme<'scheme>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<'scheme> PartialEq for UnregisteredScheme<'scheme>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'scheme> PartialEq<str> for UnregisteredScheme<'scheme>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'scheme> PartialEq<UnregisteredScheme<'scheme>> for str
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a, 'scheme> PartialEq<&'a str> for UnregisteredScheme<'scheme>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a, 'scheme> PartialEq<UnregisteredScheme<'scheme>> for &'a str
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'scheme> TryFrom<&'scheme [u8]> for UnregisteredScheme<'scheme>
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<'scheme> TryFrom<&'scheme str> for UnregisteredScheme<'scheme>
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

Auto Trait Implementations

impl<'scheme> Send for UnregisteredScheme<'scheme>

impl<'scheme> Sync for UnregisteredScheme<'scheme>