pub struct Transaction<D: Deliverable> { /* private fields */ }Expand description
A container type for a hyper::Request as well as the deliverable
which receives the result of the request.
Implementations§
Source§impl<D: Deliverable> Transaction<D>
impl<D: Deliverable> Transaction<D>
pub fn new( deliverable: D, request: Request<Body>, requires_body: bool, ) -> Transaction<D>
Sourcepub fn with_parent_span(self, span_id: impl Into<Option<Id>>) -> Self
pub fn with_parent_span(self, span_id: impl Into<Option<Id>>) -> Self
Report tracing events for this transaction within the tracing::Span
with the provided ID. Most interesting of these events is the
debug-level http_request span, which tries to have fields provided in
the opentelemetry HTTP conventions document. This event will be reported
wether this method is called or not, but it will be much more useful if
you provide a parent span so that you can determine why the request is
being made.
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md
Trait Implementations§
Auto Trait Implementations§
impl<D> !Freeze for Transaction<D>
impl<D> !RefUnwindSafe for Transaction<D>
impl<D> Send for Transaction<D>
impl<D> Sync for Transaction<D>where
D: Sync,
impl<D> Unpin for Transaction<D>where
D: Unpin,
impl<D> !UnwindSafe for Transaction<D>
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