pub struct UsageQueue { /* private fields */ }Implementations§
Source§impl UsageQueue
impl UsageQueue
Sourcepub fn configure(&self, management_enabled: bool, cfg: &Config)
pub fn configure(&self, management_enabled: bool, cfg: &Config)
Applies one published config (Go server_reload.go): disabling the queue drops everything queued; retention is clamped to 1..=3600 seconds.
Sourcepub fn accepts(&self) -> bool
pub fn accepts(&self) -> bool
Whether a usage record would be kept; producers can skip building one.
pub fn wants_claude_cache(&self) -> bool
Sourcepub fn enqueue(&self, payload: Vec<u8>)
pub fn enqueue(&self, payload: Vec<u8>)
Queues one serialized usage record (Go usageQueuePlugin.HandleUsage +
Enqueue).
Sourcepub fn subscribe_usage(&self) -> Subscription
pub fn subscribe_usage(&self) -> Subscription
Go SubscribeUsage: usage records as they are produced, after a first
{"support_refresh":true}.
Sourcepub fn subscribe_errors(&self) -> Subscription
pub fn subscribe_errors(&self) -> Subscription
Go SubscribeErrors.
Sourcepub fn enqueue_error(&self, payload: &[u8])
pub fn enqueue_error(&self, payload: &[u8])
Go EnqueueError: an error event for errors subscribers; nothing is queued.
Sourcepub fn wants_errors(&self) -> bool
pub fn wants_errors(&self) -> bool
Whether an error event would reach anyone; producers can skip building one.
Sourcepub fn notify_usage_refresh(&self)
pub fn notify_usage_refresh(&self)
Go NotifyUsageRefresh: tells usage subscribers the credential set changed.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for UsageQueue
impl Forget for UsageQueue
impl Move for UsageQueue
impl RefUnwindSafe for UsageQueue
impl Send for UsageQueue
impl Sync for UsageQueue
impl Unpin for UsageQueue
impl UnsafeUnpin for UsageQueue
impl UnwindSafe for UsageQueue
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more