pub struct Backend {
pub build_check: fn(Option<&Meta>, &TokenStream, &str, &TokenStream) -> TokenStream,
}Fields§
§build_check: fn(Option<&Meta>, &TokenStream, &str, &TokenStream) -> TokenStreamImplementations§
Source§impl Backend
impl Backend
Sourcepub fn instrument_trait(
&self,
spec: Spec,
the_trait: ItemTrait,
) -> Result<ItemTrait>
pub fn instrument_trait( &self, spec: Spec, the_trait: ItemTrait, ) -> Result<ItemTrait>
Expand trait items by mangling each method and adding a wrapper default impl.
Mangling a function involves the following:
- Rename the function following the pattern:
fn add->fn __anodized_add. - Make a new function with the original name that has a default impl; the default impl performs runtime validation and calls the mangled function.
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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