mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make Response::url private.
This commit is contained in:
parent
c1e1695f66
commit
15b55c3231
3 changed files with 7 additions and 3 deletions
|
@ -79,7 +79,7 @@ pub enum ResponseMsg {
|
|||
pub struct Response {
|
||||
pub response_type: ResponseType,
|
||||
pub termination_reason: Option<TerminationReason>,
|
||||
pub url: Option<Url>,
|
||||
url: Option<Url>,
|
||||
pub url_list: RefCell<Vec<Url>>,
|
||||
/// `None` can be considered a StatusCode of `0`.
|
||||
#[ignore_heap_size_of = "Defined in hyper"]
|
||||
|
@ -136,6 +136,10 @@ impl Response {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn url(&self) -> Option<&Url> {
|
||||
self.url.as_ref()
|
||||
}
|
||||
|
||||
pub fn is_network_error(&self) -> bool {
|
||||
match self.response_type {
|
||||
ResponseType::Error(..) => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue