pub struct Retained { /* private fields */ }Expand description
Holds only server metadata. No agent message or working stream reaches it.
Implementations§
Source§impl Retained
impl Retained
Sourcepub fn bind_console(&self, console: &Arc<ConsoleHub>) -> Result<(), AgentError>
pub fn bind_console(&self, console: &Arc<ConsoleHub>) -> Result<(), AgentError>
Uses the existing console’s signal, with no timer or second publisher.
§Errors
A console was already installed.
Sourcepub fn new(
bounds: AgentsConfig,
supervisor: ChannelSupervisor,
device: &str,
) -> Arc<Self> ⓘ
pub fn new( bounds: AgentsConfig, supervisor: ChannelSupervisor, device: &str, ) -> Arc<Self> ⓘ
Shares the server’s channel scheduler; creates no worker or timer.
Sourcepub fn publish(&self, values: &[(String, Value)]) -> Result<(), AgentError>
pub fn publish(&self, values: &[(String, Value)]) -> Result<(), AgentError>
Installs both presence and state atomically before delivering either.
§Errors
Metadata is oversized, a lock is poisoned, or a watcher cannot receive. A delivery failure does not erase the retained values.
Sourcepub fn subscribe(
self: &Arc<Self>,
id: u64,
subject: &str,
schemas: &[SchemaId],
install: Option<InboxInstall>,
) -> Result<ConnectionSubscription, AgentError>
pub fn subscribe( self: &Arc<Self>, id: u64, subject: &str, schemas: &[SchemaId], install: Option<InboxInstall>, ) -> Result<ConnectionSubscription, AgentError>
Subscribes under the same lock used by writers: the current value is always queued first and every later change follows it. The supplied wire inbox budget is installed before that first enqueue.
§Errors
Unknown subject, too many watchers, a refused schema, or failed delivery.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Retained
impl !RefUnwindSafe for Retained
impl !UnwindSafe for Retained
impl Send for Retained
impl Sync for Retained
impl Unpin for Retained
impl UnsafeUnpin for Retained
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