pub struct AllowedOrigin {
pub src: Address,
pub protocols: Option<Vec<ProtocolType>>,
}Expand description
An origin allow-list rule: a source address and the protocols permitted for it.
Fields§
§src: AddressAnycast source address, or a unicastv4/unicastv6 marker
protocols: Option<Vec<ProtocolType>>Permitted protocols (None = any protocol)
Implementations§
Source§impl AllowedOrigin
impl AllowedOrigin
Sourcepub fn allows(&self, p_type: ProtocolType) -> bool
pub fn allows(&self, p_type: ProtocolType) -> bool
Whether this rule permits the given protocol.
Trait Implementations§
Source§impl Clone for AllowedOrigin
impl Clone for AllowedOrigin
Source§fn clone(&self) -> AllowedOrigin
fn clone(&self) -> AllowedOrigin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AllowedOrigin
impl Debug for AllowedOrigin
Auto Trait Implementations§
impl Freeze for AllowedOrigin
impl RefUnwindSafe for AllowedOrigin
impl Send for AllowedOrigin
impl Sync for AllowedOrigin
impl Unpin for AllowedOrigin
impl UnsafeUnpin for AllowedOrigin
impl UnwindSafe for AllowedOrigin
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].