pub struct AgUiEventFilter { /* private fields */ }Expand description
Allowlist of event kinds that the emitter is permitted to forward.
Emission is configurable so operators can opt out of high-volume streams
(e.g. TEXT_MESSAGE_CONTENT deltas on a Telegram channel where per-token
updates cost more than they inform) without changing the producer code.
By default every kind is enabled — downstream deployments narrow the
allowlist via Self::only, Self::with, and Self::without.
Implementations§
Source§impl AgUiEventFilter
impl AgUiEventFilter
Sourcepub fn deny_all() -> Self
pub fn deny_all() -> Self
Filter that allows no events. Useful as a starting point for narrowly-scoped sinks.
Sourcepub fn only<I: IntoIterator<Item = AgUiEventKind>>(kinds: I) -> Self
pub fn only<I: IntoIterator<Item = AgUiEventKind>>(kinds: I) -> Self
Filter that allows only the provided kinds.
Sourcepub fn with(self, kind: AgUiEventKind) -> Self
pub fn with(self, kind: AgUiEventKind) -> Self
Add a kind to the allowlist, returning the updated filter.
Sourcepub fn without(self, kind: AgUiEventKind) -> Self
pub fn without(self, kind: AgUiEventKind) -> Self
Remove a kind from the allowlist, returning the updated filter.
Sourcepub fn allows(&self, kind: AgUiEventKind) -> bool
pub fn allows(&self, kind: AgUiEventKind) -> bool
true when kind is permitted by this filter.
Trait Implementations§
Source§impl Clone for AgUiEventFilter
impl Clone for AgUiEventFilter
Source§impl Debug for AgUiEventFilter
impl Debug for AgUiEventFilter
Auto Trait Implementations§
impl Freeze for AgUiEventFilter
impl RefUnwindSafe for AgUiEventFilter
impl Send for AgUiEventFilter
impl Sync for AgUiEventFilter
impl Unpin for AgUiEventFilter
impl UnsafeUnpin for AgUiEventFilter
impl UnwindSafe for AgUiEventFilter
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.