| Crates.io | rx_core_macro_observer_derive |
| lib.rs | rx_core_macro_observer_derive |
| version | 0.2.0 |
| created_at | 2026-01-18 23:15:57.576491+00 |
| updated_at | 2026-01-24 14:57:51.107333+00 |
| description | rx_core observer derive, implements associated type only traits |
| homepage | https://github.com/AlexAegis/rx_bevy |
| repository | https://github.com/AlexAegis/rx_bevy |
| max_upload_size | |
| id | 2053291 |
| size | 11,370 |
Helper macro to implement a few traits required for a observer.
RxObserverWithPrimaryCategory: Sets the associated type to
PrimaryCategoryObserverObserverInput: Sets the associated type In to the value of the
#[rx_in(...)] attribute, or to Never (Infallible) if missing. Also
sets the associated InError type to the value of the
#[rx_in_error(...)] attribute, or to Never if missing.UpgradeableObserver: By default. It implements UpgradeableObserver by
wrapping the subject into a ObserverSubscriber. This implementation can
be opted out with the #[rx_does_not_upgrade_to_observer_subscriber]
attribute to provide a manual implementation. Other preset
implementations can be used with the #[rx_upgrades_to(...)] attribute.All attributes are prefixed with
rx_for easy auto-complete access.
#[rx_in(...)] (optional, default: Never): Defines the input type of
the subscriber#[rx_in_error(...)] (optional, default: Never): Defines the input
error type of the subscriber#[rx_does_not_upgrade_to_observer_subscriber] (optional): Opts out the
default UpgradeableObserver implementation which just wraps the
Subject in a ObserverSubscriber when used as a destination for an
Observable to prevent upstream from unsubscribing the entire Subject.#[rx_upgrades_to(...)] (optional, accepts: self,
observer_subscriber): Defines a preset implementation for
UpgradeableObserver
self: Upgraded version is itself, causing it to be unsubscribed
when upstream is unsubscribed when used as an observables destination.observer_subscriber: Upgraded version is itself wrapped in
ObserverSubscriber, causing it to not be unsubscribed when
upstream is unsubscribed when used as an observables destination.RxExecutor -
Derive macro for Executors.RxObservable -
Derive macro for Observables.RxOperator -
Derive macro for Operators.RxScheduler -
Derive macro for Schedulers.RxSubject -
Derive macro for Subjects.RxSubscriber -
Derive macro for Subscribers.RxSubscription -
Derive macro for Subscriptions.RxWork -
Derive macro for schedulable work.In case you want to inspect the output of the proc macro.
If you haven't installed cargo-expand yet, install it first:
cargo install cargo-expand
Then expand the macro output:
cargo expand -p rx_core_observable_interval