Struct quilkin::filters::ReadContext
source · 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§
§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§
source§impl 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§
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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> 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