pub struct RequestWriterLayer<W> { /* private fields */ }
Expand description
Layer that applies RequestWriterService
which prints the http request in std format.
Implementations§
Source§impl<W> RequestWriterLayer<W>
impl<W> RequestWriterLayer<W>
Sourcepub const fn new(writer: W) -> Self
pub const fn new(writer: W) -> Self
Create a new RequestWriterLayer
with a custom RequestWriter
.
Source§impl RequestWriterLayer<UnboundedSender<Request>>
impl RequestWriterLayer<UnboundedSender<Request>>
Sourcepub fn writer_unbounded<W>(
executor: &Executor,
writer: W,
mode: Option<WriterMode>,
) -> Self
pub fn writer_unbounded<W>( executor: &Executor, writer: W, mode: Option<WriterMode>, ) -> Self
Create a new RequestWriterLayer
that prints requests to an AsyncWrite
r
over an unbounded channel
Sourcepub fn stdout_unbounded(executor: &Executor, mode: Option<WriterMode>) -> Self
pub fn stdout_unbounded(executor: &Executor, mode: Option<WriterMode>) -> Self
Create a new RequestWriterLayer
that prints requests to stdout
over an unbounded channel.
Sourcepub fn stderr_unbounded(executor: &Executor, mode: Option<WriterMode>) -> Self
pub fn stderr_unbounded(executor: &Executor, mode: Option<WriterMode>) -> Self
Create a new RequestWriterLayer
that prints requests to stderr
over an unbounded channel.
Source§impl RequestWriterLayer<Sender<Request>>
impl RequestWriterLayer<Sender<Request>>
Sourcepub fn writer<W>(
executor: &Executor,
writer: W,
buffer_size: usize,
mode: Option<WriterMode>,
) -> Self
pub fn writer<W>( executor: &Executor, writer: W, buffer_size: usize, mode: Option<WriterMode>, ) -> Self
Create a new RequestWriterLayer
that prints requests to an AsyncWrite
r
over a bounded channel with a fixed buffer size.
Sourcepub fn stdout(
executor: &Executor,
buffer_size: usize,
mode: Option<WriterMode>,
) -> Self
pub fn stdout( executor: &Executor, buffer_size: usize, mode: Option<WriterMode>, ) -> Self
Create a new RequestWriterLayer
that prints requests to stdout
over a bounded channel with a fixed buffer size.
Sourcepub fn stderr(
executor: &Executor,
buffer_size: usize,
mode: Option<WriterMode>,
) -> Self
pub fn stderr( executor: &Executor, buffer_size: usize, mode: Option<WriterMode>, ) -> Self
Create a new RequestWriterLayer
that prints requests to stderr
over a bounded channel with a fixed buffer size.
Trait Implementations§
Source§impl<W: Clone> Clone for RequestWriterLayer<W>
impl<W: Clone> Clone for RequestWriterLayer<W>
Source§impl<W> Debug for RequestWriterLayer<W>
impl<W> Debug for RequestWriterLayer<W>
Auto Trait Implementations§
impl<W> Freeze for RequestWriterLayer<W>where
W: Freeze,
impl<W> RefUnwindSafe for RequestWriterLayer<W>where
W: RefUnwindSafe,
impl<W> Send for RequestWriterLayer<W>where
W: Send,
impl<W> Sync for RequestWriterLayer<W>where
W: Sync,
impl<W> Unpin for RequestWriterLayer<W>where
W: Unpin,
impl<W> UnwindSafe for RequestWriterLayer<W>where
W: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more