Skip to main content

Module subscriptions

Module subscriptions 

Source
Expand description

Subscription types for streaming data Subscription types for sync/async streaming data.

§Canonical paths

  • Async Subscription / extensionsibapi::Subscription, ibapi::subscriptions::SubscriptionItemStreamExt. The crate-root and subscriptions::* re-exports resolve to the async implementation whenever the async feature is on (which is the default).
  • Blocking (sync) Subscription / iteratorsibapi::client::blocking::Subscription (and SubscriptionIter, SubscriptionOwnedIter, etc.). The labelled blocking submodule is the canonical sync-explicit path. When only sync is enabled, ibapi::Subscription also resolves to the blocking form.

The subscriptions::sync and subscriptions::r#async submodules where the impls live are #[doc(hidden)]: still reachable as paths for crate-internal use, but intentionally absent from the docs.rs navigation. Prefer the canonical spellings above. Raw-identifier syntax (subscriptions::r#async::Subscription) is the giveaway that the spelling is non-canonical.

Structs§

FilterData
Adapter that filters SubscriptionItem::Notice items (logging them at warn!) from any Iterator<Item = Result<SubscriptionItem<T>, Error>> and yields the underlying Result<T, Error> to the caller.
FilterDataStream
Stream adapter that filters SubscriptionItem::Notice items (logging them at warn!) from any Stream<Item = Result<SubscriptionItem<T>, Error>> and yields the underlying Result<T, Error> to the caller.
NoticeStream
A handle for receiving globally routed notices on the async transport.
NoticeStreamIter
Blocking iterator yielded by NoticeStream::iter.
Subscription
Asynchronous subscription for streaming data.
SubscriptionIter
Blocking iterator over Result<SubscriptionItem<T>, Error>.
SubscriptionOwnedIter
Owned blocking iterator over Result<SubscriptionItem<T>, Error>.
SubscriptionTimeoutIter
Timeout-bounded iterator.
SubscriptionTryIter
Non-blocking iterator.

Enums§

SubscriptionItem
An item yielded by a Subscription.

Traits§

SharesChannel
Marker trait for subscriptions that share a channel based on message type
SubscriptionItemIterExt
Extension trait that adds filter_data to any iterator yielding Result<SubscriptionItem<T>, Error>. Use it to compose the data-only flow with iterator combinators that the built-in iter_data family doesn’t already cover, e.g. subscription.iter().take(10).filter_data().
SubscriptionItemStreamExt
Extension trait that adds filter_data to any stream yielding Result<SubscriptionItem<T>, Error>. Async mirror of the sync SubscriptionItemIterExt.