pub struct ItemFnMut<'a> { /* private fields */ }
Expand description
Handle to a an item inserted into a module which allows for mutation of item metadata.
This is returned by methods which insert meta items, such as:
While this is also returned by *_meta
inserting functions, it is instead
recommended that you make use of the appropriate macro to capture doc
comments instead:
Implementations§
Source§impl ItemFnMut<'_>
impl ItemFnMut<'_>
Sourcepub fn docs(
self,
docs: impl IntoIterator<Item: AsRef<str>>,
) -> Result<Self, ContextError>
pub fn docs( self, docs: impl IntoIterator<Item: AsRef<str>>, ) -> Result<Self, ContextError>
Set documentation for an inserted item.
This completely replaces any existing documentation.
Sourcepub fn deprecated(
self,
deprecated: impl AsRef<str>,
) -> Result<Self, ContextError>
pub fn deprecated( self, deprecated: impl AsRef<str>, ) -> Result<Self, ContextError>
Mark the given item as deprecated.
Sourcepub fn return_type<T>(self) -> Result<Self, ContextError>where
T: MaybeTypeOf,
pub fn return_type<T>(self) -> Result<Self, ContextError>where
T: MaybeTypeOf,
Set the kind of return type.
Sourcepub fn argument_types<A>(self) -> Result<Self, ContextError>where
A: FunctionArgs,
pub fn argument_types<A>(self) -> Result<Self, ContextError>where
A: FunctionArgs,
Set argument types.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ItemFnMut<'a>
impl<'a> RefUnwindSafe for ItemFnMut<'a>
impl<'a> Send for ItemFnMut<'a>
impl<'a> Sync for ItemFnMut<'a>
impl<'a> Unpin for ItemFnMut<'a>
impl<'a> !UnwindSafe for ItemFnMut<'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