pub struct WebmcpEventHub { /* private fields */ }Expand description
Bounded event hub that retains canonical VT Code runtime events.
Implementations§
Source§impl WebmcpEventHub
impl WebmcpEventHub
Sourcepub fn new(config: EventHubConfig) -> Result<Self>
pub fn new(config: EventHubConfig) -> Result<Self>
Creates a bounded event hub.
Sourcepub fn new_with_max_event_bytes(
config: EventHubConfig,
max_event_bytes: usize,
) -> Result<Self>
pub fn new_with_max_event_bytes( config: EventHubConfig, max_event_bytes: usize, ) -> Result<Self>
Creates a bounded event hub with a smaller event payload limit.
Sourcepub fn publish(&self, event: VersionedThreadEvent) -> Result<u64>
pub fn publish(&self, event: VersionedThreadEvent) -> Result<u64>
Publishes a canonical runtime event and returns its bridge sequence.
Sourcepub fn subscribe(
&self,
after_sequence: Option<u64>,
) -> Result<EventHubSubscription>
pub fn subscribe( &self, after_sequence: Option<u64>, ) -> Result<EventHubSubscription>
Subscribes after a sequence, returning retained events before live events.
Sourcepub fn latest_sequence(&self) -> u64
pub fn latest_sequence(&self) -> u64
Returns the latest assigned sequence, or zero before the first event.
Trait Implementations§
Source§impl Clone for WebmcpEventHub
impl Clone for WebmcpEventHub
Source§fn clone(&self) -> WebmcpEventHub
fn clone(&self) -> WebmcpEventHub
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WebmcpEventHub
impl RefUnwindSafe for WebmcpEventHub
impl Send for WebmcpEventHub
impl Sync for WebmcpEventHub
impl Unpin for WebmcpEventHub
impl UnsafeUnpin for WebmcpEventHub
impl UnwindSafe for WebmcpEventHub
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