Struct rustfmt_nightly::items::FnSig
source · pub(crate) struct FnSig<'a> {
decl: &'a FnDecl,
generics: &'a Generics,
ext: Extern,
is_async: Cow<'a, Async>,
constness: Const,
defaultness: Defaultness,
unsafety: Unsafe,
visibility: &'a Visibility,
}
Expand description
Represents a fn’s signature.
Fields
decl: &'a FnDecl
generics: &'a Generics
ext: Extern
is_async: Cow<'a, Async>
constness: Const
defaultness: Defaultness
unsafety: Unsafe
visibility: &'a Visibility
Implementations
sourceimpl<'a> FnSig<'a>
impl<'a> FnSig<'a>
pub(crate) fn from_method_sig(
method_sig: &'a FnSig,
generics: &'a Generics,
visibility: &'a Visibility
) -> FnSig<'a>
pub(crate) fn from_fn_kind(
fn_kind: &'a FnKind<'_>,
decl: &'a FnDecl,
defaultness: Defaultness
) -> FnSig<'a>
fn to_str(&self, context: &RewriteContext<'_>) -> String
Auto Trait Implementations
impl<'a> !RefUnwindSafe for FnSig<'a>
impl<'a> !Send for FnSig<'a>
impl<'a> !Sync for FnSig<'a>
impl<'a> Unpin for FnSig<'a>
impl<'a> !UnwindSafe for FnSig<'a>
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
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: 112 bytes