pub trait BoundExt<T> {
// Required method
fn try_map<U, E, F>(self, f: F) -> Result<Bound<U>, E>
where F: FnOnce(T) -> Result<U, E>;
}Expand description
Extension trait for std::ops::Bound to allow fallible mapping of its contents.
This is useful in situations where range bounds must be converted into a different type
prior to range-queries (e.g. converting a Bound<usize> received from an API but needing
to index into an internal structure requiring Bound<std::num::NonZeroU16>), where
the conversion operation itself is fallible (e.g. try_from).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".