pub struct StreamState { /* private fields */ }Expand description
Locally readable authority; a poisoned lock closes admission by name.
Implementations§
Source§impl StreamState
impl StreamState
Sourcepub fn for_log(log: GrantLog) -> Arc<Self> ⓘ
pub fn for_log(log: GrantLog) -> Arc<Self> ⓘ
Installs a closed authority before any reader or protected connection exists.
Sourcepub fn snapshot(&self) -> Result<StreamDiagnostics, StreamError>
pub fn snapshot(&self) -> Result<StreamDiagnostics, StreamError>
Counts-only snapshot; nothing is answered from a poisoned hold.
§Errors
Names an untrusted authority hold rather than fabricating counters.
Sourcepub fn health(&self) -> StreamHealth
pub fn health(&self) -> StreamHealth
Health reports a failure explicitly while preserving the liveness route.
Sourcepub fn subscribe(&self) -> Receiver<Result<StreamDiagnostics, StreamError>>
pub fn subscribe(&self) -> Receiver<Result<StreamDiagnostics, StreamError>>
Owned progress signal for consumers and tests; no timer or request is created.
Sourcepub fn cancellation(&self) -> Receiver<bool>
pub fn cancellation(&self) -> Receiver<bool>
Cancellation also interrupts in-flight membership and binding requests.
Trait Implementations§
Source§impl Debug for StreamState
impl Debug for StreamState
Source§impl GrantDecisionSource for StreamState
impl GrantDecisionSource for StreamState
Source§fn decide(
&self,
log: &GrantLogId,
grants: &[GrantId],
at_least: Revision,
) -> Result<DecisionReply, RevocationRefusal>
fn decide( &self, log: &GrantLogId, grants: &[GrantId], at_least: Revision, ) -> Result<DecisionReply, RevocationRefusal>
The decisions on
grants. Read moreSource§impl MembershipAuthority for StreamState
impl MembershipAuthority for StreamState
Source§fn state(&self) -> AuthorityState
fn state(&self) -> AuthorityState
The authority’s current state.
Auto Trait Implementations§
impl !Freeze for StreamState
impl RefUnwindSafe for StreamState
impl Send for StreamState
impl Sync for StreamState
impl Unpin for StreamState
impl UnsafeUnpin for StreamState
impl UnwindSafe for StreamState
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