Struct proc_macro_assertions::add_generics::WithGenerics
source · pub struct WithGenerics<'a, T> {
pub data: T,
pub generics: Option<MaybeBorrowed<'a, Generics>>,
}
Expand description
A type representing some T
with some generics attached to it.
Usually created by AttachGenerics::with_generics
.
Fields§
§data: T
The data the generics are attached to
generics: Option<MaybeBorrowed<'a, Generics>>
The generics that are attached to the data.
Trait Implementations§
source§impl<'a, G> Assertable<'a> for WithGenerics<'a, Assert<'a, G>>where
G: Generatable<'a> + Eq + Ord,
G::Assert: Eq + Ord,
impl<'a, G> Assertable<'a> for WithGenerics<'a, Assert<'a, G>>where G: Generatable<'a> + Eq + Ord, G::Assert: Eq + Ord,
source§impl<'a, T> InsertIntoTemplate<'a, T> for WithGenerics<'a, MaybeBorrowed<'a, T>>where
T: Generatable<'a> + Eq + Ord,
T::Assert: Eq + Ord,
impl<'a, T> InsertIntoTemplate<'a, T> for WithGenerics<'a, MaybeBorrowed<'a, T>>where T: Generatable<'a> + Eq + Ord, T::Assert: Eq + Ord,
§type Output = WithGenerics<'a, Assert<'a, T>>
type Output = WithGenerics<'a, Assert<'a, T>>
The type of the Assert generated by the Template
Self
source§fn test<U>(self, ty: U) -> Self::Outputwhere
U: Into<MaybeBorrowed<'a, T::Assert>>,
fn test<U>(self, ty: U) -> Self::Outputwhere U: Into<MaybeBorrowed<'a, T::Assert>>,
Test some type against the template
Self
and turn
it into Self::Output
. So that the type may
either be borrowed or owned, any type that
can be turned into MaybeBorrowed<T::Assert>
source§impl<'a, T> InsertIntoTemplate<'a, T> for WithGenerics<'a, T>where
T: Generatable<'a> + Eq + Ord,
T::Assert: Eq + Ord,
impl<'a, T> InsertIntoTemplate<'a, T> for WithGenerics<'a, T>where T: Generatable<'a> + Eq + Ord, T::Assert: Eq + Ord,
source§fn test<U>(self, ty: U) -> RawAssert<'a, T>where
U: Into<MaybeBorrowed<'a, T::Assert>>,
fn test<U>(self, ty: U) -> RawAssert<'a, T>where U: Into<MaybeBorrowed<'a, T::Assert>>,
Test some type against the template
Self
and turn
it into Self::Output
. So that the type may
either be borrowed or owned, any type that
can be turned into MaybeBorrowed<T::Assert>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for WithGenerics<'a, T>where T: RefUnwindSafe,
impl<'a, T> !Send for WithGenerics<'a, T>
impl<'a, T> !Sync for WithGenerics<'a, T>
impl<'a, T> Unpin for WithGenerics<'a, T>where T: Unpin,
impl<'a, T> UnwindSafe for WithGenerics<'a, T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> AnyExt for Twhere
T: Any + ?Sized,
impl<T> AnyExt for Twhere T: Any + ?Sized,
source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where T: Any,
Attempts to downcast this to
T
behind referencesource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where T: Any,
Attempts to downcast this to
T
behind mutable referencesource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where T: Any,
Attempts to downcast this to
T
behind Rc
pointersource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where T: Any,
Attempts to downcast this to
T
behind Arc
pointersource§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