pub struct FnClassifier<I: ?Sized, O, F>{ /* private fields */ }Expand description
Adapter that wraps a free function fn(&I) -> O as a
Classifier<I, O>. Useful when a typed primitive already exists
as a free function (e.g. shigoto_types::failure::classify) and
you want to use it polymorphically without rewriting.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<I, O, F> Freeze for FnClassifier<I, O, F>
impl<I, O, F> RefUnwindSafe for FnClassifier<I, O, F>where
F: RefUnwindSafe,
I: ?Sized,
impl<I, O, F> Send for FnClassifier<I, O, F>where
I: ?Sized,
impl<I, O, F> Sync for FnClassifier<I, O, F>where
I: ?Sized,
impl<I, O, F> Unpin for FnClassifier<I, O, F>
impl<I, O, F> UnsafeUnpin for FnClassifier<I, O, F>where
F: UnsafeUnpin,
I: ?Sized,
impl<I, O, F> UnwindSafe for FnClassifier<I, O, F>where
F: UnwindSafe,
I: ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more