octseq::builder

Function with_infallible

source
pub fn with_infallible<F, T, E>(op: F) -> T
where F: FnOnce() -> Result<T, E>, E: Into<Infallible>,
Expand description

Erases an error for a closure returning an infallible results.

This function can be used for a sequence of operations on an infallible octets builder. By wrapping these operations in a closure, you can still use the question mark operator rather than having to wrap each individual operation in infallible.