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: StatusCodeResponse code
content_type: HeaderValueResponse content type
content: StringResponse 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