Skip to main content

KnownFnPointer

Trait KnownFnPointer 

Source
pub trait KnownFnPointer: TupleFn<Self::ArgsTuple> {
    type ArgsTuple;
    type FnPointerWithRefArgs;
    type DynFnOnce: ?Sized;
    type DynFnMut: ?Sized;
    type DynFn: ?Sized;
}

Required Associated Types§

Source

type ArgsTuple

The type of arguments tuple of this fn pointer. For example, the following types in each pair are equivalent.

    <fn() -> String as KnownFnPointer>::ArgsTuple
    ()

    <fn(i32) -> String as KnownFnPointer>::ArgsTuple
    (i32,)

    <fn(i32, bool) -> String as KnownFnPointer>::ArgsTuple
    (i32, bool)
Source

type FnPointerWithRefArgs

The type of the fn pointer which accepts corresponding references of arguments. For example, the following types in each pair are equivalent.

    <fn() -> String as KnownFnPointer>::FnPointerWithRefArgs
    fn() -> String

    <fn(i32) -> String as KnownFnPointer>::FnPointerWithRefArgs
    fn(&i32) -> String

    <fn(i32, bool) -> String as KnownFnPointer>::FnPointerWithRefArgs
    fn(&i32, &bool) -> String
Source

type DynFnOnce: ?Sized

The corresponding dyn FnOnce type. For example, the following types in each pair are equivalent.

    <fn() -> String as KnownFnPointer>::DynFnOnce
    dyn FnOnce() -> String

    <fn(i32) -> String as KnownFnPointer>::DynFnOnce
    dyn FnOnce(i32) -> String

    <fn(i32, bool) -> String as KnownFnPointer>::DynFnOnce
    dyn FnOnce(i32, bool) -> String
Source

type DynFnMut: ?Sized

The corresponding dyn DynFnMut type. For example, the following types in each pair are equivalent.

    <fn() -> String as KnownFnPointer>::DynFnMut
    dyn FnMut() -> String

    <fn(i32) -> String as KnownFnPointer>::DynFnMut
    dyn FnMut(i32) -> String

    <fn(i32, bool) -> String as KnownFnPointer>::DynFnMut
    dyn FnMut(i32, bool) -> String
Source

type DynFn: ?Sized

The corresponding dyn DynFn type. For example, the following types in each pair are equivalent.

    <fn() -> String as KnownFnPointer>::DynFn
    dyn Fn() -> String

    <fn(i32) -> String as KnownFnPointer>::DynFn
    dyn Fn(i32) -> String

    <fn(i32, bool) -> String as KnownFnPointer>::DynFn
    dyn Fn(i32, bool) -> String

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<R> KnownFnPointer for fn() -> R

Source§

type ArgsTuple = ()

Source§

type FnPointerWithRefArgs = fn() -> R

Source§

type DynFnOnce = dyn FnOnce() -> R

Source§

type DynFnMut = dyn FnMut() -> R

Source§

type DynFn = dyn Fn() -> R

Source§

impl<R, A1> KnownFnPointer for fn(A1) -> R

Source§

type ArgsTuple = (A1,)

Source§

type FnPointerWithRefArgs = fn(&A1) -> R

Source§

type DynFnOnce = dyn FnOnce(A1) -> R

Source§

type DynFnMut = dyn FnMut(A1) -> R

Source§

type DynFn = dyn Fn(A1) -> R

Source§

impl<R, A1, A2> KnownFnPointer for fn(A1, A2) -> R

Source§

type ArgsTuple = (A1, A2)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2) -> R

Source§

type DynFn = dyn Fn(A1, A2) -> R

Source§

impl<R, A1, A2, A3> KnownFnPointer for fn(A1, A2, A3) -> R

Source§

type ArgsTuple = (A1, A2, A3)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3) -> R

Source§

impl<R, A1, A2, A3, A4> KnownFnPointer for fn(A1, A2, A3, A4) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4) -> R

Source§

impl<R, A1, A2, A3, A4, A5> KnownFnPointer for fn(A1, A2, A3, A4, A5) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7, A8> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7, A8) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7, A8)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7, &A8) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7, A8) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7, A8) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7, A8) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7, A8, A9> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7, A8, A9) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7, A8, A9)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7, &A8, &A9) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7, A8, A9) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7, A8, A9) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7, &A8, &A9, &A10) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7, &A8, &A9, &A10, &A11) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7, &A8, &A9, &A10, &A11, &A12) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7, &A8, &A9, &A10, &A11, &A12, &A13) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7, &A8, &A9, &A10, &A11, &A12, &A13, &A14) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) -> R

Source§

impl<R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> KnownFnPointer for fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) -> R

Source§

type ArgsTuple = (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)

Source§

type FnPointerWithRefArgs = fn(&A1, &A2, &A3, &A4, &A5, &A6, &A7, &A8, &A9, &A10, &A11, &A12, &A13, &A14, &A15) -> R

Source§

type DynFnOnce = dyn FnOnce(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) -> R

Source§

type DynFnMut = dyn FnMut(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) -> R

Source§

type DynFn = dyn Fn(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) -> R

Implementors§