Struct rustdoc::clean::types::FnDecl [−][src]
pub(crate) struct FnDecl {
pub(crate) inputs: Arguments,
pub(crate) output: FnRetTy,
pub(crate) c_variadic: bool,
}
Fields
inputs: Arguments
output: FnRetTy
c_variadic: bool
Implementations
Returns the sugared return type for an async function.
For example, if the return type is impl std::future::Future<Output = i32>
, this function
will return i32
.
Panics
This function will panic if the return type does not match the expected sugaring for async functions.
pub(crate) fn print<'b, 'a: 'b, 'tcx: 'a>(
&'a self,
cx: &'a Context<'tcx>
) -> impl Display + 'b + Captures<'tcx>
header_len
: The length of the function header and name. In other words, the number of characters in the function declaration up to but not including the parentheses.
Used to determine line-wrapping.indent
: The number of spaces to indent each successive line with, if line-wrapping is necessary.asyncness
: Whether the function is async or not.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FnDecl
impl UnwindSafe for FnDecl
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes