Struct rustdoc::clean::types::FnDecl [−][src]
pub(crate) struct FnDecl {
pub(crate) inputs: Arguments,
pub(crate) output: FnRetTy,
pub(crate) c_variadic: bool,
pub(crate) attrs: Attributes,
}Fields
inputs: Argumentsoutput: FnRetTyc_variadic: boolattrs: AttributesImplementations
impl FnDecl[src]
pub(crate) fn self_type(&self) -> Option<SelfTy>[src]
pub(crate) fn sugared_async_return_type(&self) -> FnRetTy[src]
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.
impl FnDecl[src]
pub(crate) fn print<'b, 'a: 'b, 'tcx: 'a>(
&'a self,
cache: &'b Cache,
tcx: TyCtxt<'tcx>
) -> impl Display + 'b + Captures<'tcx>[src]
&'a self,
cache: &'b Cache,
tcx: TyCtxt<'tcx>
) -> impl Display + 'b + Captures<'tcx>
pub(crate) fn full_print<'b, 'a: 'b, 'tcx: 'a>(
&'a self,
cache: &'b Cache,
tcx: TyCtxt<'tcx>,
header_len: usize,
indent: usize,
asyncness: IsAsync
) -> impl Display + 'b + Captures<'tcx>[src]
&'a self,
cache: &'b Cache,
tcx: TyCtxt<'tcx>,
header_len: usize,
indent: usize,
asyncness: IsAsync
) -> 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.
fn inner_full_print(
&self,
cache: &Cache,
tcx: TyCtxt<'_>,
header_len: usize,
indent: usize,
asyncness: IsAsync,
f: &mut Formatter<'_>
) -> Result[src]
&self,
cache: &Cache,
tcx: TyCtxt<'_>,
header_len: usize,
indent: usize,
asyncness: IsAsync,
f: &mut Formatter<'_>
) -> Result
Trait Implementations
impl<'a, A: Copy> Clean<FnDecl> for (&'a FnDecl<'a>, A) where
(&'a [Ty<'a>], A): Clean<Arguments>, [src]
(&'a [Ty<'a>], A): Clean<Arguments>,
fn clean(&self, cx: &mut DocContext<'_>) -> FnDecl[src]
impl<'tcx> Clean<FnDecl> for (DefId, PolyFnSig<'tcx>)[src]
fn clean(&self, cx: &mut DocContext<'_>) -> FnDecl[src]
impl Clone for FnDecl[src]
impl Debug for FnDecl[src]
impl Eq for FnDecl[src]
impl FromWithTcx<FnDecl> for FnDecl[src]
impl Hash for FnDecl[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<FnDecl> for FnDecl[src]
impl StructuralEq for FnDecl[src]
impl StructuralPartialEq for FnDecl[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,