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
sourceimpl 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.
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn 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>,
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
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: 88 bytes