pub enum ProtocolUsageMode {
    Ignored,
    Used,
    UsedWithUndefinedIfEmpty,
}
Expand description

How to handle the URL protocol, or the absence of it, during UrlParsing.

Description

The “Use Protocol” checkbox in PasswordMaker Pro Javascript Edition has some weird behaviour, that’s probably a bug. This enum lets you select how to hande the case that the user wants to use the Protocol, but the input string doesn’t contain one.

Variants§

§

Ignored

The protocol part of the URI is not used in the output.

§

Used

The protocol part of the URI is used in the output, if it’s non-empty in the input. Otherwise it isn’t.

§

UsedWithUndefinedIfEmpty

The protocol part of the URI is used in the output, if it’s non-empty in the input. Otherwise the string “undefined” is used in the output. This mirrors behaviour of the PasswordMaker Pro Javascript Edition.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.