pub struct ResponseMessage {
pub header: TResponseHeader,
pub body: Option<Bytes>,
pub attachments: Vec<Bytes>,
}Expand description
A response, taken apart.
Fields§
§header: TResponseHeader§body: Option<Bytes>§attachments: Vec<Bytes>Implementations§
Source§impl ResponseMessage
impl ResponseMessage
Sourcepub fn request_id(&self) -> Option<Guid>
pub fn request_id(&self) -> Option<Guid>
The request this response answers.
Sourcepub fn error(&self) -> Option<YtError>
pub fn error(&self) -> Option<YtError>
The server-reported failure, if there is one.
TResponseHeader.error is optional and “if omitted then OK is assumed”
— and an error with code 0 is also success, which is why this checks the
code rather than the presence of the field. NewErrorFromProto in
yt/go/proto/core/misc/convert.go makes the same test.
Trait Implementations§
Source§impl Clone for ResponseMessage
impl Clone for ResponseMessage
Source§fn clone(&self) -> ResponseMessage
fn clone(&self) -> ResponseMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ResponseMessage
impl RefUnwindSafe for ResponseMessage
impl Send for ResponseMessage
impl Sync for ResponseMessage
impl Unpin for ResponseMessage
impl UnsafeUnpin for ResponseMessage
impl UnwindSafe for ResponseMessage
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