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§
source§impl FnDecl
impl FnDecl
pub(crate) fn self_type(&self) -> Option<SelfTy>
sourcepub(crate) fn sugared_async_return_type(&self) -> FnRetTy
pub(crate) fn sugared_async_return_type(&self) -> FnRetTy
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.
source§impl FnDecl
impl FnDecl
pub(crate) fn print<'b, 'a: 'b, 'tcx: 'a>(
&'a self,
cx: &'a Context<'tcx>
) -> impl Display + 'b + Captures<'tcx>
sourcepub(crate) fn full_print<'a, 'tcx: 'a>(
&'a self,
header_len: usize,
indent: usize,
cx: &'a Context<'tcx>
) -> impl Display + 'a + Captures<'tcx>
pub(crate) fn full_print<'a, 'tcx: 'a>(
&'a self,
header_len: usize,
indent: usize,
cx: &'a Context<'tcx>
) -> impl Display + 'a + 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.
fn inner_full_print(
&self,
header_len: usize,
indent: usize,
f: &mut Formatter<'_>,
cx: &Context<'_>
) -> Result
Trait Implementations§
impl Eq for FnDecl
impl StructuralEq for FnDecl
impl StructuralPartialEq for FnDecl
Auto Trait Implementations§
impl RefUnwindSafe for FnDecl
impl Send for FnDecl
impl Sync for FnDecl
impl Unpin for FnDecl
impl UnwindSafe for FnDecl
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
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: 64 bytes