pub struct Response {
pub msg_type: u8,
pub body: Body,
}Expand description
Represents an outgoing protocol response.
Fields§
§msg_type: u8The 1-byte message type identifier (usually echoes the Request type).
body: BodyImplementations§
Source§impl Response
impl Response
Sourcepub fn new(msg_type: u8, body: impl Into<Body>) -> Self
pub fn new(msg_type: u8, body: impl Into<Body>) -> Self
Creates a new Response from in-memory bytes or an empty variant.
Auto Trait Implementations§
impl !Freeze for Response
impl !RefUnwindSafe for Response
impl Send for Response
impl !Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl !UnwindSafe for Response
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