pub struct Response {
pub warnings: Vec<Warning>,
pub envelope: Envelope,
pub body: Vec<String>,
}Expand description
One full response: warnings + envelope + body lines.
Fields§
§warnings: Vec<Warning>§envelope: Envelope§body: Vec<String>Implementations§
Source§impl Response
impl Response
Sourcepub fn head(&self) -> ResponseHead
pub fn head(&self) -> ResponseHead
Return the response head, useful when the body is irrelevant (e.g. for re-encoding to print to the user).
Sourcepub fn render_wire(&self) -> String
pub fn render_wire(&self) -> String
Re-emit the response in canonical wire form, including the
trailing blank line. Used by --json=off (the default) to
stream the daemon’s response to stdout verbatim.
Trait Implementations§
impl Eq for Response
impl StructuralPartialEq for Response
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