pub struct Drop;
Expand description
Always drops a packet, mostly useful in combination with other filters.
Trait Implementations§
Source§impl Filter for Drop
impl Filter for Drop
Source§fn read<P: PacketMut>(
&self,
_: &mut ReadContext<'_, P>,
) -> Result<(), FilterError>
fn read<P: PacketMut>( &self, _: &mut ReadContext<'_, P>, ) -> Result<(), FilterError>
Filter::read
is invoked when the proxy receives data from a
downstream connection on the listening port. Read moreSource§fn write<P: PacketMut>(
&self,
_: &mut WriteContext<P>,
) -> Result<(), FilterError>
fn write<P: PacketMut>( &self, _: &mut WriteContext<P>, ) -> Result<(), FilterError>
Filter::write
is invoked when the proxy is about to send data to a
downstream connection via the listening port after receiving it via one
of the upstream Endpoints. Read moreSource§impl From<Drop> for FilterKind
impl From<Drop> for FilterKind
Source§fn from(v: Drop) -> FilterKind
fn from(v: Drop) -> FilterKind
Converts to this type from the input type.
Source§impl StaticFilter for Drop
impl StaticFilter for Drop
Source§const NAME: &'static str = "quilkin.filters.drop.v1alpha1.Drop"
const NAME: &'static str = "quilkin.filters.drop.v1alpha1.Drop"
The globally unique name of the filter.
Source§type Configuration = Config
type Configuration = Config
The human-readable configuration of the filter. Must be
serde
compatible, have a JSON schema, and be convertible to and
from Self::BinaryConfiguration
.Source§type BinaryConfiguration = Drop
type BinaryConfiguration = Drop
The binary configuration of the filter. Must be
prost
compatible,
and be convertible to and from Self::Configuration
.Source§fn try_from_config(
_: Option<Self::Configuration>,
) -> Result<Self, CreationError>
fn try_from_config( _: Option<Self::Configuration>, ) -> Result<Self, CreationError>
Instantiates a new
StaticFilter
from the given configuration, if any. Read moreSource§fn from_config(config: Option<Self::Configuration>) -> Self
fn from_config(config: Option<Self::Configuration>) -> Self
Instantiates a new
StaticFilter
from the given configuration, if any. Read moreSource§fn factory() -> DynFilterFactorywhere
Self: 'static,
fn factory() -> DynFilterFactorywhere
Self: 'static,
Creates a new dynamic
FilterFactory
virtual table.Source§fn ensure_config_exists(
config: Option<Self::Configuration>,
) -> Result<Self::Configuration, CreationError>
fn ensure_config_exists( config: Option<Self::Configuration>, ) -> Result<Self::Configuration, CreationError>
Convenience method for providing a consistent error message for filters
which require a fully initialized
Self::Configuration
.fn as_filter_config( config: impl Into<Option<Self::Configuration>>, ) -> Result<Filter, CreationError>
fn as_labeled_filter_config( config: impl Into<Option<Self::Configuration>>, label: String, ) -> Result<Filter, CreationError>
Auto Trait Implementations§
impl Freeze for Drop
impl RefUnwindSafe for Drop
impl Send for Drop
impl Sync for Drop
impl Unpin for Drop
impl UnwindSafe for Drop
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