Struct AccessControlSetBuilder
pub struct AccessControlSetBuilder(/* private fields */);Expand description
A builder interface for constructing an AccessControlSet.
Implementations§
§impl<'a> AccessControlSetBuilder
impl<'a> AccessControlSetBuilder
pub fn new(name: &'static str) -> AccessControlSetBuilder
pub fn new(name: &'static str) -> AccessControlSetBuilder
Construct a builder for an access control set with the given name.
The name is used to contextualize logging when an IpAddr is denied.
pub fn allow(
self,
allow: impl Iterator<Item = &'a IpNet>,
) -> AccessControlSetBuilder
pub fn allow( self, allow: impl Iterator<Item = &'a IpNet>, ) -> AccessControlSetBuilder
Override the Self::deny() list for the provided IP networks, allowing access.
Existing networks allowed by prior Self::allow() calls are not removed.
See AccessControlSet for more information on the access semantics.
pub fn deny(
self,
deny: impl Iterator<Item = &'a IpNet>,
) -> AccessControlSetBuilder
pub fn deny( self, deny: impl Iterator<Item = &'a IpNet>, ) -> AccessControlSetBuilder
Deny clients from the provided IP networks, unless present in the Self::allow() list.
Existing networks denied by prior Self::deny() calls are not removed.
See AccessControlSet for more information on the access semantics.
pub fn clear_allow(self) -> AccessControlSetBuilder
pub fn clear_allow(self) -> AccessControlSetBuilder
Clear all IP networks previous allowed with Self::allow().
pub fn clear_deny(self) -> AccessControlSetBuilder
pub fn clear_deny(self) -> AccessControlSetBuilder
Clear all IP networks previously denied with Self::deny().
pub fn build(self) -> Result<AccessControlSet, ProtoError>
pub fn build(self) -> Result<AccessControlSet, ProtoError>
Consume the builder and produce an AccessControlSet.
Returns an error if Self::allow() was used to add deny list override networks
without using Self::deny() to specify one or more denied networks.
Auto Trait Implementations§
impl !Freeze for AccessControlSetBuilder
impl !RefUnwindSafe for AccessControlSetBuilder
impl Send for AccessControlSetBuilder
impl Sync for AccessControlSetBuilder
impl Unpin for AccessControlSetBuilder
impl UnsafeUnpin for AccessControlSetBuilder
impl UnwindSafe for AccessControlSetBuilder
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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> 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> ⓘ
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> ⓘ
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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more