pub trait Refine {
// Provided methods
fn refine_ref<R: Refining<Value = Self> + ?Sized>(
&self,
) -> RecoverableRefinementRef<'_, R> { ... }
fn refine<R: Refining<Value = Self>>(self) -> RecoverableRefinement<R>
where Self: Sized { ... }
}Expand description
Extends any type T to allow refining its values with R implementing Refining<Value = T>.
Provided Methods§
Sourcefn refine_ref<R: Refining<Value = Self> + ?Sized>(
&self,
) -> RecoverableRefinementRef<'_, R>
fn refine_ref<R: Refining<Value = Self> + ?Sized>( &self, ) -> RecoverableRefinementRef<'_, R>
Refines the given value with R by reference.
This is the same as calling R::checked_ref on Self reference.
§Errors
See checked_ref.
Sourcefn refine<R: Refining<Value = Self>>(self) -> RecoverableRefinement<R>where
Self: Sized,
fn refine<R: Refining<Value = Self>>(self) -> RecoverableRefinement<R>where
Self: Sized,
Refines the given value with R.
This is the same as calling R::checked on Self value.
§Errors
See checked.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".