pub struct DebugLayer { /* private fields */ }Expand description
Configuration for the gRPC debug middleware.
Implementations§
Source§impl DebugLayer
impl DebugLayer
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new DebugLayer with default configuration.
By default, headers and bodies are logged, hex dumps are off.
Sourcepub fn with_config(config: DebugConfig) -> Self
pub fn with_config(config: DebugConfig) -> Self
Create a new DebugLayer with the given configuration.
Sourcepub fn log_headers(self, enabled: bool) -> Self
pub fn log_headers(self, enabled: bool) -> Self
Set whether to log request/response headers.
Sourcepub fn log_bodies(self, enabled: bool) -> Self
pub fn log_bodies(self, enabled: bool) -> Self
Set whether to log request/response bodies.
Sourcepub fn log_response_frames(self, enabled: bool) -> Self
pub fn log_response_frames(self, enabled: bool) -> Self
Set whether to log individual response body frames.
Sourcepub fn max_body_bytes(self, max: usize) -> Self
pub fn max_body_bytes(self, max: usize) -> Self
Set the maximum number of bytes to capture for body inspection.
Trait Implementations§
Source§impl Clone for DebugLayer
impl Clone for DebugLayer
Source§fn clone(&self) -> DebugLayer
fn clone(&self) -> DebugLayer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DebugLayer
impl Debug for DebugLayer
Source§impl Default for DebugLayer
impl Default for DebugLayer
Auto Trait Implementations§
impl Freeze for DebugLayer
impl RefUnwindSafe for DebugLayer
impl Send for DebugLayer
impl Sync for DebugLayer
impl Unpin for DebugLayer
impl UnsafeUnpin for DebugLayer
impl UnwindSafe for DebugLayer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request