[][src]Struct solana_jsonrpc_http_server::Response

pub struct Response {
    pub code: StatusCode,
    pub content_type: HeaderValue,
    pub content: String,
}

Simple server response structure

Fields

Response code

Response content type

Response body

Methods

impl Response
[src]

Create a response with empty body and 200 OK status code.

Create a response with given body and 200 OK status code.

Create a response for plaintext internal error.

Create a json response for service unavailable.

Create a response for not allowed hosts.

Create a response for unsupported content type.

Create a response for disallowed method used.

CORS invalid

CORS header invalid

Create a response for bad request

Create a response for too large (413)

Trait Implementations

impl From<Response> for Response<Body>
[src]

Converts from a jsonrpc Response to a hyper::Response

Panics

Panics if the response cannot be converted due to failure to parse body content.

impl From<Response> for RequestMiddlewareAction
[src]

impl Debug for Response
[src]

Auto Trait Implementations

impl Send for Response

impl Sync for Response

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T