pub struct Response { /* private fields */ }Implementations§
Source§impl Response
impl Response
Sourcepub fn document(&self) -> &Document
pub fn document(&self) -> &Document
Examples found in repository?
examples/client.rs (line 16)
8fn main() {
9 // This example uses fake JSON:API
10 let client = Client::new("https://jsonapiplayground.reyesoft.com/v2");
11
12 let response: Response = client
13 .get("/stores", &[("filter[created_by]", "1,3".to_string())])
14 .unwrap();
15
16 let document: &Document = response.document();
17
18 println!("{:#?}", document);
19}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