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, A> Assertable<'a> for WithGenerics<'a, Assert<'a, G, A>>where
G: Generatable<'a, A> + Eq + Ord,
A: Eq + Ord + TidAble<'a>,
impl<'a, G, A> Assertable<'a> for WithGenerics<'a, Assert<'a, G, A>>where G: Generatable<'a, A> + Eq + Ord, A: Eq + Ord + TidAble<'a>,
source§impl<'a, T, A> InsertIntoTemplate<'a, T, A> for WithGenerics<'a, MaybeBorrowed<'a, T>>where
T: Generatable<'a, A> + Eq + Ord,
A: Eq + Ord + 'a + TidAble<'a>,
impl<'a, T, A> InsertIntoTemplate<'a, T, A> for WithGenerics<'a, MaybeBorrowed<'a, T>>where T: Generatable<'a, A> + Eq + Ord, A: Eq + Ord + 'a + TidAble<'a>,
§type Output = WithGenerics<'a, Assert<'a, T, A>>
type Output = WithGenerics<'a, Assert<'a, T, A>>
The type of the Assert generated by the Template
Self
source§fn test<B>(
self,
ty: impl Into<MaybeBorrowed<'a, A>>
) -> WithGenerics<'a, Assert<'a, T, A>>where
B: TypeEq<This = A>,
fn test<B>( self, ty: impl Into<MaybeBorrowed<'a, A>> ) -> WithGenerics<'a, Assert<'a, T, A>>where B: TypeEq<This = A>,
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, A> InsertIntoTemplate<'a, T, A> for WithGenerics<'a, T>where
T: Generatable<'a, A> + Eq + Ord,
A: Eq + Ord + 'a + TidAble<'a>,
impl<'a, T, A> InsertIntoTemplate<'a, T, A> for WithGenerics<'a, T>where T: Generatable<'a, A> + Eq + Ord, A: Eq + Ord + 'a + TidAble<'a>,
source§fn test<B>(self, ty: impl Into<MaybeBorrowed<'a, A>>) -> RawAssert<'a, T, A>where
B: TypeEq<This = A>,
fn test<B>(self, ty: impl Into<MaybeBorrowed<'a, A>>) -> RawAssert<'a, T, A>where B: TypeEq<This = A>,
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