#[non_exhaustive]pub struct WriteContext {
pub endpoint: Endpoint,
pub source: EndpointAddress,
pub dest: EndpointAddress,
pub contents: Vec<u8>,
pub metadata: DynamicMetadata,
}
Expand description
The input arguments to Filter::write
.
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.endpoint: Endpoint
The upstream endpoint that we’re expecting packets from.
source: EndpointAddress
The source of the received packet.
dest: EndpointAddress
The destination 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 WriteContext
impl WriteContext
sourcepub fn new(
endpoint: Endpoint,
source: EndpointAddress,
dest: EndpointAddress,
contents: Vec<u8>
) -> Self
pub fn new(
endpoint: Endpoint,
source: EndpointAddress,
dest: EndpointAddress,
contents: Vec<u8>
) -> Self
Creates a new WriteContext
Auto Trait Implementations
impl RefUnwindSafe for WriteContext
impl Send for WriteContext
impl Sync for WriteContext
impl Unpin for WriteContext
impl UnwindSafe for WriteContext
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