Skip to main content

FnWithSig

Trait FnWithSig 

Source
pub unsafe trait FnWithSig<Sig: FnSig>: FnMutWithSig<Sig> { }
Expand description

Trait implemented by closures that can be invoked by shared reference with signature Sig.

§Safety

  • VTABLE.call must be a valid trampoline for Self that, given a pointer to a properly aligned and initialized Self with shared (&Self) access for the duration of the call, invokes Self by shared reference without mutating, moving, or dropping it.
  • VTABLE.once must satisfy the safety requirements of FnOnceWithSig::VTABLE_ONCE for Self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A1, A2, A3, A4, A5, A6, A7, A8, Ret, F> FnWithSig<fn(A1, A2, A3, A4, A5, A6, A7, A8) -> Ret> for F
where F: Fn(A1, A2, A3, A4, A5, A6, A7, A8) -> Ret,

Source§

impl<A1, A2, A3, A4, A5, A6, A7, Ret, F> FnWithSig<fn(A1, A2, A3, A4, A5, A6, A7) -> Ret> for F
where F: Fn(A1, A2, A3, A4, A5, A6, A7) -> Ret,

Source§

impl<A1, A2, A3, A4, A5, A6, Ret, F> FnWithSig<fn(A1, A2, A3, A4, A5, A6) -> Ret> for F
where F: Fn(A1, A2, A3, A4, A5, A6) -> Ret,

Source§

impl<A1, A2, A3, A4, A5, Ret, F> FnWithSig<fn(A1, A2, A3, A4, A5) -> Ret> for F
where F: Fn(A1, A2, A3, A4, A5) -> Ret,

Source§

impl<A1, A2, A3, A4, Ret, F> FnWithSig<fn(A1, A2, A3, A4) -> Ret> for F
where F: Fn(A1, A2, A3, A4) -> Ret,

Source§

impl<A1, A2, A3, Ret, F> FnWithSig<fn(A1, A2, A3) -> Ret> for F
where F: Fn(A1, A2, A3) -> Ret,

Source§

impl<A1, A2, Ret, F> FnWithSig<fn(A1, A2) -> Ret> for F
where F: Fn(A1, A2) -> Ret,

Source§

impl<A1, Ret, F> FnWithSig<fn(A1) -> Ret> for F
where F: Fn(A1) -> Ret,

Source§

impl<Ret, F> FnWithSig<fn() -> Ret> for F
where F: Fn() -> Ret,