Struct salvo_core::routing::filters::PortFilter
source · #[non_exhaustive]pub struct PortFilter {
pub port: u16,
pub lack: bool,
}
Expand description
Filter by request uri host.
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.port: u16
Port to filter.
lack: bool
When port is lack in request uri, use this value.
Implementations§
Trait Implementations§
source§impl Clone for PortFilter
impl Clone for PortFilter
source§fn clone(&self) -> PortFilter
fn clone(&self) -> PortFilter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PortFilter
impl Debug for PortFilter
source§impl Filter for PortFilter
impl Filter for PortFilter
source§fn filter(&self, req: &mut Request, _state: &mut PathState) -> bool
fn filter(&self, req: &mut Request, _state: &mut PathState) -> bool
Filter
Request
and returns false or true.source§impl PartialEq for PortFilter
impl PartialEq for PortFilter
source§fn eq(&self, other: &PortFilter) -> bool
fn eq(&self, other: &PortFilter) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for PortFilter
impl StructuralPartialEq for PortFilter
Auto Trait Implementations§
impl Freeze for PortFilter
impl RefUnwindSafe for PortFilter
impl Send for PortFilter
impl Sync for PortFilter
impl Unpin for PortFilter
impl UnwindSafe for PortFilter
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.