pub struct Invoke<F>(/* private fields */);
Expand description
Type-level function which implements TypeFn
by delegating to F
This is mostly a workaround to write F: TypeFn<T>
bounds in Rust 1.57.0
(trait bounds in const fn
s were stabilized in Rust 1.61.0).
Because Foo<F>: Trait
-style bounds unintentionally work in 1.57.0,
this crate uses Invoke<F>: TypeFn<T>
when the "rust_1_61"
feature is disabled,
and F: TypeFn<T>
when it is enabled.
Implementations§
Trait Implementations§
impl<F> Copy for Invoke<F>
Auto Trait Implementations§
impl<F> Freeze for Invoke<F>
impl<F> RefUnwindSafe for Invoke<F>
impl<F> Send for Invoke<F>
impl<F> Sync for Invoke<F>
impl<F> Unpin for Invoke<F>
impl<F> UnwindSafe for Invoke<F>
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