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§
Source§impl Clone for ProtocolUsageMode
impl Clone for ProtocolUsageMode
Source§fn clone(&self) -> ProtocolUsageMode
fn clone(&self) -> ProtocolUsageMode
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProtocolUsageMode
impl Debug for ProtocolUsageMode
impl Copy for ProtocolUsageMode
Auto Trait Implementations§
impl Freeze for ProtocolUsageMode
impl RefUnwindSafe for ProtocolUsageMode
impl Send for ProtocolUsageMode
impl Sync for ProtocolUsageMode
impl Unpin for ProtocolUsageMode
impl UnwindSafe for ProtocolUsageMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more