#[non_exhaustive]pub struct ReadContext {
pub endpoints: Vec<Endpoint>,
pub source: EndpointAddress,
pub contents: Vec<u8>,
pub metadata: DynamicMetadata,
}
Expand description
The input arguments to Filter::read
.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.endpoints: Vec<Endpoint>
The upstream endpoints that the packet will be forwarded to.
source: EndpointAddress
The source of the received packet.
contents: Vec<u8>
Contents of the received packet.
metadata: DynamicMetadata
Arbitrary values that can be passed from one filter to another.
Implementations
sourceimpl ReadContext
impl ReadContext
sourcepub fn new(
endpoints: Vec<Endpoint>,
source: EndpointAddress,
contents: Vec<u8>
) -> Self
pub fn new(
endpoints: Vec<Endpoint>,
source: EndpointAddress,
contents: Vec<u8>
) -> Self
Creates a new ReadContext
.
pub fn metadata(self, metadata: DynamicMetadata) -> Self
Auto Trait Implementations
impl RefUnwindSafe for ReadContext
impl Send for ReadContext
impl Sync for ReadContext
impl Unpin for ReadContext
impl UnwindSafe for ReadContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request