pub struct Request(pub Request<Value>);Tuple Fields§
§0: Request<Value>Implementations§
Source§impl Request
impl Request
pub fn query(&self) -> Option<&str>
Sourcepub fn query_param(&self, name: &str) -> Option<&str>
pub fn query_param(&self, name: &str) -> Option<&str>
Returns the query param by name.
Sourcepub fn base(&self) -> &str
pub fn base(&self) -> &str
Returns the base of the path which is the path without the last item
eg from /p1/p2/p3 returns ‘/p1/p2’
empty string when is unavailable (“/a” = “”)
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Returns the last item of the path
eg from /p1/p2/p3 returns ‘p3’
empty string when is unavailable
Sourcepub fn body(&self) -> &Value
pub fn body(&self) -> &Value
If there is a body in the request, then this will be the json of that
If not available returns Value::Null
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Request
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
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