#[repr(C)]pub struct RackResponse {
pub value: uintptr_t,
pub code: c_int,
pub num_headers: c_int,
pub headers: *mut KeyValue,
pub body: *mut c_char,
pub is_file: c_int,
}Expand description
Response generated by a Rack application.
The VALUE returned by Ruby is kept to ensure
the garbage collector doesn’t run while we’re processing this response.
Fields§
§value: uintptr_tRuby object reference.
code: c_intResponse code, e.g. 200.
num_headers: c_intNumber of HTTP headers in the response.
headers: *mut KeyValueHeader key/value pairs.
body: *mut c_charResponse body as bytes.
is_file: c_int1 if this is a file, 0 if its bytes.
Implementations§
Trait Implementations§
Source§impl Clone for RackResponse
impl Clone for RackResponse
Source§fn clone(&self) -> RackResponse
fn clone(&self) -> RackResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RackResponse
impl Debug for RackResponse
Source§impl Drop for RackResponse
impl Drop for RackResponse
Source§impl From<RackResponse> for RackResponseOwned
impl From<RackResponse> for RackResponseOwned
Source§fn from(response: RackResponse) -> RackResponseOwned
fn from(response: RackResponse) -> RackResponseOwned
Move all data out of C into Rust-owned memory. This also drops the reference to the Rack response array, allowing it to be garbage collected.
Auto Trait Implementations§
impl Freeze for RackResponse
impl RefUnwindSafe for RackResponse
impl !Send for RackResponse
impl !Sync for RackResponse
impl Unpin for RackResponse
impl UnwindSafe for RackResponse
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