pub(crate) struct Request {
channel: ChannelOwner,
url: String,
resource_type: String,
method: String,
is_navigation_request: bool,
post_data: Option<String>,
frame: Weak<Frame>,
headers: HashMap<String, String>,
redirected_from: Option<Weak<Request>>,
var: Mutex<Variable>,
}Fields§
§channel: ChannelOwner§url: String§resource_type: String§method: String§post_data: Option<String>§frame: Weak<Frame>§headers: HashMap<String, String>§redirected_from: Option<Weak<Request>>§var: Mutex<Variable>Implementations§
Source§impl Request
impl Request
pub(crate) fn try_new( ctx: &Context, channel: ChannelOwner, ) -> Result<Arc<Self>, Error>
pub(crate) fn url(&self) -> &str
pub(crate) fn resource_type(&self) -> &str
pub(crate) fn method(&self) -> &str
pub(crate) fn frame(&self) -> Weak<Frame>
pub(crate) fn post_data(&self) -> Option<Vec<u8>>
pub(crate) fn post_data_as_string(&self) -> Option<String>
pub(crate) fn headers(&self) -> &HashMap<String, String>
pub(crate) fn redirected_from(&self) -> Option<Weak<Request>>
pub(crate) async fn response( &self, ) -> Result<Option<Weak<Response>>, Arc<Error>>
Source§impl Request
impl Request
pub(crate) fn timing(&self) -> Option<ResponseTiming>
pub(crate) fn response_end(&self) -> Option<f64>
pub(crate) fn failure(&self) -> Option<String>
pub(crate) fn redirected_to(&self) -> Option<Weak<Request>>
fn set_redirected_to(&self, to: Weak<Request>)
pub(crate) fn set_response_timing(&self, timing: ResponseTiming)
pub(crate) fn set_response_end(&self, response_end: f64)
pub(crate) fn set_failure(&self, failure: Option<String>)
Trait Implementations§
Source§impl RemoteObject for Request
impl RemoteObject for Request
fn channel(&self) -> &ChannelOwner
fn channel_mut(&mut self) -> &mut ChannelOwner
fn guid(&self) -> &S<Guid>
fn context(&self) -> Result<Arc<Mutex<Context>>, Error>
fn handle_event( &self, _ctx: &Context, _method: Str<Method>, _params: Map<String, Value>, ) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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