Skip to main content

Refine

Trait Refine 

Source
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§

Source

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.

Source

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".

Implementors§

Source§

impl<T: ?Sized> Refine for T