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.callmust be a valid trampoline forSelfthat, given a pointer to a properly aligned and initializedSelfwith shared (&Self) access for the duration of the call, invokesSelfby shared reference without mutating, moving, or dropping it.VTABLE.oncemust satisfy the safety requirements ofFnOnceWithSig::VTABLE_ONCEforSelf.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".