pub struct SharedSubscriber<Value> { /* private fields */ }Expand description
Delivers owned values through a weak captured reference.
Implementations§
Sourcepub fn yield_value(&self, value: Value) -> Result<bool, SharedAccessError>
pub fn yield_value(&self, value: Value) -> Result<bool, SharedAccessError>
Replaces a live value, returning false after its final owner has gone.
This conveys data only, not Store scope or action-delivery authority. Successful replacement supersedes already started reloads atomically. Displaced values are dropped after releasing both internal locks.
§Errors
Returns Busy or Poisoned without applying the value or superseding a reload.
§Panics
A displaced value’s destructor may panic after replacement. It runs after releasing both internal locks.
Sourcepub fn prepare_publication(&self) -> Option<SharedPublication<Value>>
pub fn prepare_publication(&self) -> Option<SharedPublication<Value>>
Retains this captured reference for one externally fenced publication.
Prepare before acquiring a caller-owned cancellation fence. Release that fence before dropping this owner or the displaced value. Preparation does not grant Store, session or subscription authority and never finds a new reference by logical identity. Returns None after the captured resource ends.