Enum url::SchemeType [] [src]

pub enum SchemeType {
    NonRelative,
    Relative(u16),
    FileLike,
}

Determines the behavior of the URL parser for a given scheme.

Variants

NonRelative

Indicate that the scheme is non-relative.

The scheme data of the URL (everything other than the scheme, query string, and fragment identifier) is parsed as a single percent-encoded string of which no structure is assumed. That string may need to be parsed further, per a scheme-specific format.

Relative(u16)

Indicate that the scheme is relative, and what the default port number is.

The scheme data is structured as username, password, host, port number, and path. Relative URL references are supported, if a base URL was given. The string value indicates the default port number as a string of ASCII digits, or the empty string to indicate no default port number.

FileLike

Indicate a relative scheme similar to the file scheme.

For example, you might want to have distinct git+file and hg+file URL schemes.

This is like Relative except the host can be empty, there is no port number, and path parsing has (platform-independent) quirks to support Windows filenames.

Methods

impl SchemeType
[src]

fn default_port(&self) -> Option<u16>

fn same_as(&self, other: SchemeType) -> bool

Trait Implementations

impl Ord for SchemeType
[src]

fn cmp(&self, __arg_0: &SchemeType) -> Ordering

This method returns an Ordering between self and other. Read more

impl PartialOrd for SchemeType
[src]

fn partial_cmp(&self, __arg_0: &SchemeType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, __arg_0: &SchemeType) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, __arg_0: &SchemeType) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, __arg_0: &SchemeType) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, __arg_0: &SchemeType) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for SchemeType
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Clone for SchemeType
[src]

fn clone(&self) -> SchemeType

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for SchemeType
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Copy for SchemeType
[src]

impl Eq for SchemeType
[src]

impl PartialEq for SchemeType
[src]

fn eq(&self, __arg_0: &SchemeType) -> bool

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

fn ne(&self, __arg_0: &SchemeType) -> bool

This method tests for !=.