pub struct TransportRequest<'a> { /* private fields */ }Expand description
Provider-neutral request passed to a blocking transport.
Implementations§
Source§impl<'a> TransportRequest<'a>
impl<'a> TransportRequest<'a>
Sourcepub const fn new(method: Method, target: RequestTarget<'a>) -> Self
pub const fn new(method: Method, target: RequestTarget<'a>) -> Self
Creates a bodyless request.
Sourcepub const fn with_content_type(self, content_type: ContentType<'a>) -> Self
pub const fn with_content_type(self, content_type: ContentType<'a>) -> Self
Adds an explicit content type for the borrowed request body.
Sourcepub const fn target(self) -> RequestTarget<'a>
pub const fn target(self) -> RequestTarget<'a>
Returns the validated origin-form target.
Sourcepub const fn content_type(self) -> Option<ContentType<'a>>
pub const fn content_type(self) -> Option<ContentType<'a>>
Returns the explicit request-body content type, when configured.
Trait Implementations§
Source§impl<'a> Clone for TransportRequest<'a>
impl<'a> Clone for TransportRequest<'a>
Source§fn clone(&self) -> TransportRequest<'a>
fn clone(&self) -> TransportRequest<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for TransportRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for TransportRequest<'a>
impl<'a> RefUnwindSafe for TransportRequest<'a>
impl<'a> Send for TransportRequest<'a>
impl<'a> Sync for TransportRequest<'a>
impl<'a> Unpin for TransportRequest<'a>
impl<'a> UnsafeUnpin for TransportRequest<'a>
impl<'a> UnwindSafe for TransportRequest<'a>
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