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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)