pub struct FnPtr {
is_unsafe: bool,
abi: Abi,
inputs: &'static [TypeId],
output: TypeId,
variadic: bool,
is_splatted: bool,
splatted_index: u8,
}🔬This is a nightly-only experimental API. (
type_info #146922)Expand description
Function pointer, e.g. fn(u8),
Fields§
§is_unsafe: bool🔬This is a nightly-only experimental API. (
§type_info #146922)abi: Abi🔬This is a nightly-only experimental API. (
§type_info #146922)inputs: &'static [TypeId]🔬This is a nightly-only experimental API. (
§type_info #146922)output: TypeId🔬This is a nightly-only experimental API. (
§type_info #146922)variadic: bool🔬This is a nightly-only experimental API. (
§type_info #146922)is_splatted: bool🔬This is a nightly-only experimental API. (
§type_info #146922)splatted_index: u8🔬This is a nightly-only experimental API. (
type_info #146922)Implementations§
Source§impl FnPtr
impl FnPtr
Sourcepub const fn splatted(&self) -> Option<u8>
🔬This is a nightly-only experimental API. (type_info #146922)
pub const fn splatted(&self) -> Option<u8>
type_info #146922)Returns the splatted function argument index, or None if no argument is splatted.
e.g. in fn overload(a: u8, #[rustc_splat] b: (f32, usize)) the index is 1,
and it can be called as overload(a, 1.0, 2).
Sourcepub const fn is_variadic(&self) -> bool
🔬This is a nightly-only experimental API. (type_info #146922)
pub const fn is_variadic(&self) -> bool
type_info #146922)Whether this function is variadic, e.g. extern “C” fn add(n: usize, mut args: …);
Sourcepub const fn is_unsafe(&self) -> bool
🔬This is a nightly-only experimental API. (type_info #146922)
pub const fn is_unsafe(&self) -> bool
type_info #146922)whether this refers to an unsafe function.
Sourcepub const fn abi(&self) -> Abi
🔬This is a nightly-only experimental API. (type_info #146922)
pub const fn abi(&self) -> Abi
type_info #146922)Returns the application binary interface. For example extern “C”.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FnPtr
impl RefUnwindSafe for FnPtr
impl Send for FnPtr
impl Sync for FnPtr
impl Unpin for FnPtr
impl UnsafeUnpin for FnPtr
impl UnwindSafe for FnPtr
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> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
🔬This is a nightly-only experimental API. (
core_io_internals)Returns a lower bound on the number of elements this container-like item
contains.
For example, an array
[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
🔬This is a nightly-only experimental API. (
ptr_alignment_type #102070)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read more