rx_core_macro_operator_derive

Crates.iorx_core_macro_operator_derive
lib.rsrx_core_macro_operator_derive
version0.2.0
created_at2026-01-18 23:16:04.313134+00
updated_at2026-01-24 14:58:02.966692+00
descriptionrx_core operator derive, implements associated type only traits
homepagehttps://github.com/AlexAegis/rx_bevy
repositoryhttps://github.com/AlexAegis/rx_bevy
max_upload_size
id2053292
size9,947
Sandor (AlexAegis)

documentation

https://github.com/AlexAegis/rx_bevy

README

macro_operator_derive

crates.io ci codecov license

Helper macro to implement a few traits required for an operator.

Traits you still have to implement to get an operator

  • Operator or ComposableOperator

Traits Implemented

  • WithPrimaryCategory: Sets the associated type to PrimaryCategoryOperator
  • ObserverInput: 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.
  • ObservableOutput: Sets the associated type Out to the value of the #[rx_out(...)] attribute, or to Never (Infallible) if missing. Also sets the associated OutError type to the value of the #[rx_out_error(...)] attribute, or to Never if missing.

Attributes

All attributes are prefixed with rx_ for easy auto-complete access.

  • #[rx_in(...)] (optional, default: Never): Defines the input type of the operator
  • #[rx_in_error(...)] (optional, default: Never): Defines the input error type of the operator
  • #[rx_out(...)] (optional, default: Never): Defines the output type of the operator; usually it's the same as the input type
  • #[rx_out_error(...)] (optional, default: Never): Defines the output error type of the operator; usually it's the same as the input error type

See Also

Expanding the proc macro

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
Commit count: 652

cargo fmt