pub struct ReplySpec {
pub payload: ReplyData,
pub status: Option<StatusCode>,
pub headers: HashMap<String, String>,
}Expand description
A builder for a reply with an explicit status and/or headers wrapped
around a payload. Start one with build_reply, chain the setters, and
finish with ReplySpec::done (which yields a ReplyData::Rich).
Fields§
§payload: ReplyDataThe body payload this spec decorates.
status: Option<StatusCode>The status code to send, or None to use the payload’s default.
headers: HashMap<String, String>Extra response headers, as name → value.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ReplySpec
Auto Trait Implementations§
impl !RefUnwindSafe for ReplySpec
impl !Sync for ReplySpec
impl !UnwindSafe for ReplySpec
impl Freeze for ReplySpec
impl Send for ReplySpec
impl Unpin for ReplySpec
impl UnsafeUnpin for ReplySpec
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