pub struct StreamContext { /* private fields */ }Expand description
Context for an active xDS stream.
Tracks metadata about a client connection including:
- Stream identifier
- Node information
- Timing information
- Request/response counts
Implementations§
Source§impl StreamContext
impl StreamContext
Sourcepub fn created_at(&self) -> Instant
pub fn created_at(&self) -> Instant
Get when this stream was created.
Sourcepub fn record_request(&self)
pub fn record_request(&self)
Record a request.
Sourcepub fn record_response(&self)
pub fn record_response(&self)
Record a response.
Sourcepub fn request_count(&self) -> u64
pub fn request_count(&self) -> u64
Get total requests.
Sourcepub fn response_count(&self) -> u64
pub fn response_count(&self) -> u64
Get total responses.
Trait Implementations§
Source§impl Debug for StreamContext
impl Debug for StreamContext
Auto Trait Implementations§
impl !Freeze for StreamContext
impl RefUnwindSafe for StreamContext
impl Send for StreamContext
impl Sync for StreamContext
impl Unpin for StreamContext
impl UnsafeUnpin for StreamContext
impl UnwindSafe for StreamContext
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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