Skip to main content

OpenRequest

Struct OpenRequest 

Source
pub struct OpenRequest {
    request: Handle,
    _connection: Handle,
    _session: Handle,
}
Expand description

A sent request whose response headers have arrived; fields drop in declaration order, request before connection before session.

Fields§

§request: Handle§_connection: Handle§_session: Handle

Implementations§

Source§

impl OpenRequest

Source

pub fn send( target: &UrlTarget, method: &str, bearer: Option<&str>, body: Option<&[u8]>, ) -> Result<OpenRequest, HttpError>

body, when given, goes as application/json, the only type the installer posts.

Source

pub fn query_number(&self, info: u32) -> Result<u32, HttpError>

A numeric response header, such as the status code or content length.

Source

pub fn query_text(&self, info: u32) -> Option<String>

A textual response header, or None when it is absent or its length cannot be read.

Source

pub fn read(&self, buffer: &mut [u8]) -> Result<usize, HttpError>

The next part of the body; 0 at its end.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.