Struct quilkin::filters::ReadContext
source · #[non_exhaustive]pub struct ReadContext {
pub endpoints: Arc<ClusterMap>,
pub destinations: Vec<EndpointAddress>,
pub source: EndpointAddress,
pub contents: PoolBuffer,
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: Arc<ClusterMap>
The upstream endpoints that the packet will be forwarded to.
destinations: Vec<EndpointAddress>
The upstream endpoints that the packet will be forwarded to.
source: EndpointAddress
The source of the received packet.
contents: PoolBuffer
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: Arc<ClusterMap>,
source: EndpointAddress,
contents: PoolBuffer
) -> Self
pub fn new( endpoints: Arc<ClusterMap>, source: EndpointAddress, contents: PoolBuffer ) -> Self
Creates a new ReadContext
.
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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