Trait webkit2gtk::prelude::URIResponseExt
source · [−]pub trait URIResponseExt: 'static {
fn content_length(&self) -> u64;
fn mime_type(&self) -> Option<GString>;
fn status_code(&self) -> u32;
fn suggested_filename(&self) -> Option<GString>;
fn uri(&self) -> Option<GString>;
fn connect_content_length_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_http_headers_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_mime_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_status_code_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_suggested_filename_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
}
Expand description
Required Methods
sourcefn content_length(&self) -> u64
fn content_length(&self) -> u64
Get the expected content length of the URIResponse
.
It can be 0 if the server provided an incorrect or missing Content-Length.
Returns
the expected content length of self
.
sourcefn status_code(&self) -> u32
fn status_code(&self) -> u32
Get the status code of the URIResponse
.
Get the status code of the URIResponse
as returned by
the server. It will normally be a SoupKnownStatusCode
, for
example SOUP_STATUS_OK
, though the server can respond with any
unsigned integer.
Returns
the status code of self
sourcefn suggested_filename(&self) -> Option<GString>
fn suggested_filename(&self) -> Option<GString>
fn connect_content_length_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourcefn connect_http_headers_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_http_headers_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
Available on crate feature
v2_6
only.