Struct jsonrpc_http_server::Response [−][src]
pub struct Response {
pub code: StatusCode,
pub content_type: HeaderValue,
pub content: String,
}
Expand description
Simple server response structure
Fields
code: StatusCode
Response code
content_type: HeaderValue
Response content type
content: String
Response body
Implementations
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
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Response
impl UnwindSafe for Response
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more