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>>
impl<'a, G, A> Assertable<'a> for WithGenerics<'a, Assert<'a, G, A>>
Source§impl<'a, T, A> InsertIntoTemplate<'a, T, A> for WithGenerics<'a, MaybeBorrowed<'a, T>>
impl<'a, T, A> InsertIntoTemplate<'a, T, A> for WithGenerics<'a, MaybeBorrowed<'a, T>>
Source§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>
impl<'a, T, A> InsertIntoTemplate<'a, T, A> for WithGenerics<'a, T>
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> Freeze for WithGenerics<'a, T>where
T: Freeze,
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 T
impl<T> AnyExt for T
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