Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

operator_into_result

crates.io ci codecov license

Error handling operator. Captures upstream values and errors, and forwards them downstream as a Result.

See Also

Example

cargo run -p rx_core --example operator_into_result_example
let _s = throw("error!".to_string())
    .into_result()
    .subscribe(PrintObserver::new("into_result_operator - throw"));

let _s = just(1)
    .into_result()
    .subscribe(PrintObserver::new("into_result_operator - just"));
into_result_operator - throw - next: Err("error!")
into_result_operator - throw - unsubscribed
into_result_operator - just - next: Ok(1)
into_result_operator - just - completed
into_result_operator - just - unsubscribed