pub(crate) struct Response {
channel: ChannelOwner,
url: String,
status: i32,
status_text: String,
request: Weak<Request>,
}Fields§
§channel: ChannelOwner§url: String§status: i32§status_text: String§request: Weak<Request>Implementations§
Source§impl Response
impl Response
pub(crate) fn try_new( ctx: &Context, channel: ChannelOwner, ) -> Result<Self, Error>
pub(crate) fn url(&self) -> &str
pub(crate) fn status(&self) -> i32
pub(crate) fn status_text(&self) -> &str
pub(crate) fn ok(&self) -> bool
pub(crate) async fn finished(&self) -> Result<Option<String>, Arc<Error>>
pub(crate) async fn body(&self) -> Result<Vec<u8>, Arc<Error>>
pub(crate) async fn text(&self) -> Result<String, Arc<Error>>
pub(crate) fn request(&self) -> Weak<Request>
pub(crate) async fn headers(&self) -> Result<Vec<Header>, Arc<Error>>
Trait Implementations§
Source§impl RemoteObject for Response
impl RemoteObject for Response
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 Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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