#[non_exhaustive]pub struct Reply<T> {
pub body: T,
pub meta: ReplyMeta,
pub raw_body: Option<String>,
}Expand description
A successful answer from the API: the parsed body, and facts about the exchange.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.body: TThe parsed response body.
meta: ReplyMetaFacts about the exchange that are not part of the body.
raw_body: Option<String>The response body as the server sent it, when the transport kept it.
body is the typed view, which drops fields this crate does not know. A caller that must
pass the API’s answer on untouched reads it from here. HttpTransport
always fills it in; a fake transport usually does not.
The one change made to it: a server that echoes the API key back gets [REDACTED] in its
place, because the key must not reach anything a caller prints.
Implementations§
Trait Implementations§
impl<T: PartialEq> StructuralPartialEq for Reply<T>
Auto Trait Implementations§
impl<T> Freeze for Reply<T>where
T: Freeze,
impl<T> RefUnwindSafe for Reply<T>where
T: RefUnwindSafe,
impl<T> Send for Reply<T>where
T: Send,
impl<T> Sync for Reply<T>where
T: Sync,
impl<T> Unpin for Reply<T>where
T: Unpin,
impl<T> UnsafeUnpin for Reply<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Reply<T>where
T: UnwindSafe,
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