#[non_exhaustive]pub struct DeriveContext<'t> {
pub trait_path: &'t Path,
pub all_trait_items: &'t [TraitItem],
pub input: &'t DeriveInput,
}Expand description
Available context parameters passed to generators.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.trait_path: &'t PathThe path to reference the implemented trait.
all_trait_items: &'t [TraitItem]All known trait items in the portrait.
input: &'t DeriveInputThe input struct/enum/union.
Auto Trait Implementations§
impl<'t> Freeze for DeriveContext<'t>
impl<'t> RefUnwindSafe for DeriveContext<'t>
impl<'t> !Send for DeriveContext<'t>
impl<'t> !Sync for DeriveContext<'t>
impl<'t> Unpin for DeriveContext<'t>
impl<'t> UnwindSafe for DeriveContext<'t>
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