pub struct StreamWindowAnchor;Expand description
Stream window anchor service.
Construct via StreamWindowAnchor::start_topic. One instance
per topic is cheapest, but the service itself holds no state —
the TopicAnchor handles carry all the lifetime.
Implementations§
Source§impl StreamWindowAnchor
impl StreamWindowAnchor
Sourcepub fn start_topic(
a2a: Arc<A2ARouter>,
chain: Option<Arc<ChainManager>>,
topic: String,
window: Duration,
) -> TopicAnchor
pub fn start_topic( a2a: Arc<A2ARouter>, chain: Option<Arc<ChainManager>>, topic: String, window: Duration, ) -> TopicAnchor
Start anchoring a single topic.
Subscribes an SubscriberSink::ExternalStream sink to the
topic router, then spawns a consumer task that fires a
stream.window_commit chain event every window duration.
Returns the TopicAnchor handle. Drop it or call
TopicAnchor::shutdown to stop.
Auto Trait Implementations§
impl Freeze for StreamWindowAnchor
impl RefUnwindSafe for StreamWindowAnchor
impl Send for StreamWindowAnchor
impl Sync for StreamWindowAnchor
impl Unpin for StreamWindowAnchor
impl UnsafeUnpin for StreamWindowAnchor
impl UnwindSafe for StreamWindowAnchor
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
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