pub struct FunctionItem<'a> { /* private fields */ }
Implementations§
Source§impl<'a> FunctionItem<'a>
impl<'a> FunctionItem<'a>
pub fn name(&self) -> &str
pub fn is_method(&self) -> bool
pub fn is_associated(&self) -> bool
pub fn associated_impl(&self) -> Option<ImplItem<'a>>
pub fn inputs(&self) -> impl Iterator<Item = &(String, Type)>
pub fn output(&self) -> Option<&Type>
pub fn sig(&self) -> &FunctionSignature
pub fn generics(&self) -> &Generics
Trait Implementations§
Source§impl<'a> Clone for FunctionItem<'a>
impl<'a> Clone for FunctionItem<'a>
Source§fn clone(&self) -> FunctionItem<'a>
fn clone(&self) -> FunctionItem<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> CrateItem<'a> for FunctionItem<'a>
impl<'a> CrateItem<'a> for FunctionItem<'a>
type Inner = Function
fn downcast(inner: &ItemEnum) -> Option<&Self::Inner>
fn new(krate: &'a Crate, item: &'a Item, func: &'a Self::Inner) -> Self
fn item(&self) -> &'a Item
fn inner(&self) -> &'a Self::Inner
fn krate(&self) -> &'a Crate
fn is_public(&self) -> bool
fn is_crate_item(&self) -> bool
fn is_root_item(&self) -> bool
fn is_external_item(&self) -> bool
fn id(&'a self) -> &'a Id
fn module(&self) -> Option<ModuleItem<'a>>
Source§impl<'a> Debug for FunctionItem<'a>
impl<'a> Debug for FunctionItem<'a>
Source§impl<'a> PartialEq for FunctionItem<'a>
impl<'a> PartialEq for FunctionItem<'a>
impl<'a> Copy for FunctionItem<'a>
impl<'a> Eq for FunctionItem<'a>
impl<'a> StructuralPartialEq for FunctionItem<'a>
Auto Trait Implementations§
impl<'a> Freeze for FunctionItem<'a>
impl<'a> RefUnwindSafe for FunctionItem<'a>
impl<'a> Send for FunctionItem<'a>
impl<'a> Sync for FunctionItem<'a>
impl<'a> Unpin for FunctionItem<'a>
impl<'a> UnwindSafe for FunctionItem<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.