pub struct HttpData {
pub title: Option<String>,
pub description: Option<String>,
pub method: Method,
pub path: Path,
pub query: QueryString,
pub headers: Headers,
pub body: BodyData,
pub position: Position,
}Expand description
§HTTP Data
Data extracted from a markdown document code
block that is tagged with the language of http.
This format is mostly the same as a raw http
request.
Fields§
§title: Option<String>The heading in the markdown document found directly
above the http code block. The # and leading
whitespace are trimmed.
description: Option<String>Any text found between the heading and the http code block is treated as a description.
method: MethodParsed method from the beginning of the http code block.
path: Pathjust the path portion of the request line
query: QueryStringdata dextracted from the query string of the request line.
headers: Headersdata extracted from the headers of the http code block
body: BodyDatathe next code block immediately following the http code block is treated as the body of the request ( if any ).
position: Positionthe range from which all of this data was extracted
Trait Implementations§
impl Eq for HttpData
impl StructuralPartialEq for HttpData
Auto Trait Implementations§
impl Freeze for HttpData
impl RefUnwindSafe for HttpData
impl Send for HttpData
impl Sync for HttpData
impl Unpin for HttpData
impl UnsafeUnpin for HttpData
impl UnwindSafe for HttpData
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