| Crates.io | rx_core_operator_identity |
| lib.rs | rx_core_operator_identity |
| version | 0.2.0 |
| created_at | 2026-01-19 15:43:01.123489+00 |
| updated_at | 2026-01-24 15:07:32.855569+00 |
| description | identity operator for rx_core; a no-op operator mainly used to define input types for composite operators |
| homepage | https://github.com/AlexAegis/rx_bevy |
| repository | https://github.com/AlexAegis/rx_bevy |
| max_upload_size | |
| id | 2054829 |
| size | 11,403 |
The identity operator is a no-op operator.
In layman's terms: speedy thing goes in, speedy thing comes out.
It is used to conveniently define the input types of a composite operator.
This is why only this operator has a standalone compose_operator function and
has no Observable extension methods.
cargo run -p rx_core --example operator_identity_example
// If it would exist, this would be the same as: `just(1).identity().subscribe(...)`
let _s = IdentityOperator::default()
.operate(just(1))
.subscribe(PrintObserver::new("identity_operator"));
identity_operator - next: 1
identity_operator - completed
identity_operator - unsubscribed
cargo run -p rx_core --example operator_identity_composite_example
let composite_operator = compose_operator::<i32, Never>()
.map(|i| i + 1)
.filter(|i, _| i < &4);
let _s = (1..=5)
.into_observable()
.pipe(composite_operator)
.subscribe(PrintObserver::new("identity_operator (composite)"));
identity_operator (composite) - next: 2
identity_operator (composite) - next: 3
identity_operator (composite) - completed
identity_operator (composite) - unsubscribed