pub struct Response {
pub header: ResponseHeader,
pub payload: Bytes,
}
Expand description
Response structure
Fields§
§header: ResponseHeader
Response header
payload: Bytes
Response payload
Implementations§
Source§impl Response
impl Response
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, ProtocolError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, ProtocolError>
Deserialize a response from bytes
Sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Get the status code
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin 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