pub struct Function { /* private fields */ }Implementations§
Source§impl Function
impl Function
pub const fn name(&self) -> &'static str
pub const fn module(&self) -> Option<Module>
pub const fn path(&self) -> &'static Path
pub fn find_attributes_such_that( &self, f: impl Fn(&Attribute) -> bool, ) -> Vec<&'static Attribute>
pub fn has_attribute_such_that(&self, f: impl Fn(&Attribute) -> bool) -> bool
pub fn same_as<F: 'static>(&self) -> bool
pub fn cast<F: 'static>(&self) -> Result<&'static F, TypeMismatch>
pub fn try_call<F: 'static, R>( &self, invoke: impl FnOnce(&F) -> R, ) -> Result<R, TypeMismatch>
pub fn call<F: 'static, R>(&self, invoke: impl FnOnce(&F) -> R) -> R
Trait Implementations§
impl Eq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnsafeUnpin for Function
impl UnwindSafe for Function
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