mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Adds ServoUrl::is_secure_scheme helper
This commit is contained in:
parent
3256af1ba0
commit
9123fe0cef
1 changed files with 5 additions and 0 deletions
|
@ -79,6 +79,11 @@ impl ServoUrl {
|
|||
self.0.scheme()
|
||||
}
|
||||
|
||||
pub fn is_secure_scheme(&self) -> bool {
|
||||
let scheme = self.scheme();
|
||||
scheme == "https" || scheme == "wss"
|
||||
}
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
self.0.as_str()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue