Struct qt_core::q_url::UrlFormattingOption
source · pub struct UrlFormattingOption(/* private fields */);
Expand description
The formatting options define how the URL is formatted when written out as text.
C++ enum: QUrl::UrlFormattingOption
.
The formatting options define how the URL is formatted when written out as text.
Note that the case folding rules in Nameprep, which QUrl conforms to, require host names to always be converted to lower case, regardless of the Qt::FormattingOptions used.
The options from QUrl::ComponentFormattingOptions are also possible.
The FormattingOptions type is a typedef for QFlags<UrlFormattingOption>. It stores an OR combination of UrlFormattingOption values.
See also QUrl::ComponentFormattingOptions.
Implementations§
source§impl UrlFormattingOption
impl UrlFormattingOption
sourcepub const None: UrlFormattingOption = _
pub const None: UrlFormattingOption = _
The format of the URL is unchanged. (C++ enum variant: None = 0
)
sourcepub const RemoveScheme: UrlFormattingOption = _
pub const RemoveScheme: UrlFormattingOption = _
The scheme is removed from the URL. (C++ enum variant: RemoveScheme = 1
)
sourcepub const RemovePassword: UrlFormattingOption = _
pub const RemovePassword: UrlFormattingOption = _
Any password in the URL is removed. (C++ enum variant: RemovePassword = 2
)
sourcepub const RemoveUserInfo: UrlFormattingOption = _
pub const RemoveUserInfo: UrlFormattingOption = _
Any user information in the URL is removed. (C++ enum variant: RemoveUserInfo = 6
)
sourcepub const RemovePort: UrlFormattingOption = _
pub const RemovePort: UrlFormattingOption = _
Any specified port is removed from the URL. (C++ enum variant: RemovePort = 8
)
sourcepub const RemoveAuthority: UrlFormattingOption = _
pub const RemoveAuthority: UrlFormattingOption = _
(C++ enum variant: RemoveAuthority = 30
)
sourcepub const RemovePath: UrlFormattingOption = _
pub const RemovePath: UrlFormattingOption = _
The URL’s path is removed, leaving only the scheme, host address, and port (if present). (C++ enum variant: RemovePath = 32
)
sourcepub const RemoveQuery: UrlFormattingOption = _
pub const RemoveQuery: UrlFormattingOption = _
The query part of the URL (following a ‘?’ character) is removed. (C++ enum variant: RemoveQuery = 64
)
sourcepub const RemoveFragment: UrlFormattingOption = _
pub const RemoveFragment: UrlFormattingOption = _
(C++ enum variant: RemoveFragment = 128
)
sourcepub const PreferLocalFile: UrlFormattingOption = _
pub const PreferLocalFile: UrlFormattingOption = _
If the URL is a local file according to isLocalFile() and contains no query or fragment, a local file path is returned. (C++ enum variant: PreferLocalFile = 512
)
sourcepub const StripTrailingSlash: UrlFormattingOption = _
pub const StripTrailingSlash: UrlFormattingOption = _
The trailing slash is removed from the path, if one is present. (C++ enum variant: StripTrailingSlash = 1024
)
sourcepub const RemoveFilename: UrlFormattingOption = _
pub const RemoveFilename: UrlFormattingOption = _
The filename (i.e. everything after the last ‘/’ in the path) is removed. The trailing ‘/’ is kept, unless StripTrailingSlash is set. Only valid if RemovePath is not set. (C++ enum variant: RemoveFilename = 2048
)
sourcepub const NormalizePathSegments: UrlFormattingOption = _
pub const NormalizePathSegments: UrlFormattingOption = _
Modifies the path to remove redundant directory separators, and to resolve “.“s and “..“s (as far as possible). (C++ enum variant: NormalizePathSegments = 4096
)
Trait Implementations§
source§impl BitAnd<UrlFormattingOption> for &QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption
impl BitAnd<UrlFormattingOption> for &QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption
source§fn bitand(
self,
f: UrlFormattingOption
) -> CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
fn bitand( self, f: UrlFormattingOption ) -> CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
Calls C++ function: QUrlTwoFlags<QUrl::UrlFormattingOption, QUrl::ComponentFormattingOption> QUrlTwoFlags<QUrl::UrlFormattingOption, QUrl::ComponentFormattingOption>::operator&(QUrl::UrlFormattingOption f) const
.
§type Output = CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
type Output = CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
&
operator.source§impl BitOr<UrlFormattingOption> for &QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption
impl BitOr<UrlFormattingOption> for &QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption
source§fn bitor(
self,
f: UrlFormattingOption
) -> CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
fn bitor( self, f: UrlFormattingOption ) -> CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
Calls C++ function: QUrlTwoFlags<QUrl::UrlFormattingOption, QUrl::ComponentFormattingOption> QUrlTwoFlags<QUrl::UrlFormattingOption, QUrl::ComponentFormattingOption>::operator|(QUrl::UrlFormattingOption f) const
.
§type Output = CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
type Output = CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
|
operator.source§impl BitXor<UrlFormattingOption> for &QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption
impl BitXor<UrlFormattingOption> for &QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption
source§fn bitxor(
self,
f: UrlFormattingOption
) -> CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
fn bitxor( self, f: UrlFormattingOption ) -> CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
Calls C++ function: QUrlTwoFlags<QUrl::UrlFormattingOption, QUrl::ComponentFormattingOption> QUrlTwoFlags<QUrl::UrlFormattingOption, QUrl::ComponentFormattingOption>::operator^(QUrl::UrlFormattingOption f) const
.
§type Output = CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
type Output = CppBox<QUrlTwoFlagsOfUrlFormattingOptionComponentFormattingOption>
^
operator.source§impl Clone for UrlFormattingOption
impl Clone for UrlFormattingOption
source§fn clone(&self) -> UrlFormattingOption
fn clone(&self) -> UrlFormattingOption
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UrlFormattingOption
impl Debug for UrlFormattingOption
source§impl From<UrlFormattingOption> for c_int
impl From<UrlFormattingOption> for c_int
source§fn from(value: UrlFormattingOption) -> Self
fn from(value: UrlFormattingOption) -> Self
source§impl From<i32> for UrlFormattingOption
impl From<i32> for UrlFormattingOption
source§impl PartialEq for UrlFormattingOption
impl PartialEq for UrlFormattingOption
source§fn eq(&self, other: &UrlFormattingOption) -> bool
fn eq(&self, other: &UrlFormattingOption) -> bool
self
and other
values to be equal, and is used
by ==
.