pub struct XhrState {Show 13 fields
pub ready_state: u8,
pub is_async: bool,
pub sent: bool,
pub aborted: bool,
pub method: String,
pub url: String,
pub request_headers: BTreeMap<String, String>,
pub status: u16,
pub status_text: String,
pub response_headers: BTreeMap<String, String>,
pub response_body: String,
pub response_raw: Vec<u8>,
pub response_type: String,
}Fields§
§ready_state: u8§is_async: bool§sent: bool§aborted: bool§method: String§url: String§request_headers: BTreeMap<String, String>§status: u16§status_text: String§response_headers: BTreeMap<String, String>§response_body: String§response_raw: Vec<u8>§response_type: StringImplementations§
Source§impl XhrState
impl XhrState
pub fn new() -> Self
pub fn open(&mut self, method: &str, url: &str, is_async: bool) -> Vec<XhrEvent>
pub fn set_request_header(&mut self, name: &str, value: &str)
pub fn mark_sent(&mut self)
pub fn plan_send(&self, _body: &[u8]) -> XhrSendPlan
pub fn complete_response( &mut self, status: u16, status_text: &str, headers: BTreeMap<String, String>, body: String, raw: Vec<u8>, ) -> Vec<XhrEvent>
pub fn complete_error(&mut self, _err: &str) -> Vec<XhrEvent>
pub fn abort(&mut self) -> Vec<XhrEvent>
pub fn get_response_header(&self, name: &str) -> Option<&str>
pub fn get_all_response_headers(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XhrState
impl RefUnwindSafe for XhrState
impl Send for XhrState
impl Sync for XhrState
impl Unpin for XhrState
impl UnsafeUnpin for XhrState
impl UnwindSafe for XhrState
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